[gtk+/wip/baedert/gl: 203/216] gl renderer: Fix use of uninitialized values



commit 22be82e2001d8d22d258906a01e2c9534281b53b
Author: Timm Bäder <mail baedert org>
Date:   Sat Dec 9 14:32:24 2017 +0100

    gl renderer: Fix use of uninitialized values

 gsk/gl/gskglrenderer.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index f2a3fee..c71d065 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -929,6 +929,9 @@ render_shadow_node (GskGLRenderer       *self,
       gboolean is_offscreen;
       float dx, dy;
 
+      dx = shadow->dx;
+      dy = shadow->dy;
+
       g_assert (shadow->radius <= 0);
 
       if (gsk_render_node_get_node_type (shadow_child) == GSK_TEXT_NODE)
@@ -945,10 +948,6 @@ render_shadow_node (GskGLRenderer       *self,
       ops_set_program (builder, &self->shadow_program);
       ops_set_color (builder, &shadow->color);
       ops_set_texture (builder, texture_id);
-
-      dx = shadow->dx;
-      dy = shadow->dy;
-
       if (is_offscreen)
         {
           const GskQuadVertex vertex_data[GL_N_VERTICES] = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]