[mutter] shaped-texture: Clean up slightly



commit 25f8eaf1ac0419aa567d7010bf79c303cd4f1b15
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jul 28 11:08:25 2014 +0200

    shaped-texture: Clean up slightly

 src/compositor/meta-shaped-texture.c |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index bbcf0f9..4916aa0 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -249,21 +249,18 @@ set_cogl_texture (MetaShapedTexture *stex,
       cogl_object_ref (cogl_tex);
       width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex));
       height = cogl_texture_get_height (COGL_TEXTURE (cogl_tex));
-
-      if (width != priv->tex_width ||
-          height != priv->tex_height)
-        {
-          priv->tex_width = width;
-          priv->tex_height = height;
-
-          clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
-        }
     }
   else
     {
-      /* size changed to 0 going to an invalid handle */
-      priv->tex_width = 0;
-      priv->tex_height = 0;
+      width = 0;
+      height = 0;
+    }
+
+  if (priv->tex_width != width ||
+      priv->tex_height != height)
+    {
+      priv->tex_width = width;
+      priv->tex_height = height;
       clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
     }
 


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