[clutter/wip/optimizations-2: 10/13] actor: Skip queuing relayouts on unmapped actors



commit 8732eda3b720d1caa1e1e7e78540d980990871b7
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Mar 8 04:36:22 2013 +0000

    actor: Skip queuing relayouts on unmapped actors
    
    Unless they are being cloned, directly or because they are part of a
    cloned branch.
    
    This is similar to the behaviour of queue_redraw(), but it may cause
    some breakage, so it's a separate commit.

 clutter/clutter-actor.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index bd19a27..5fbb05f 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -8844,6 +8844,21 @@ _clutter_actor_queue_only_relayout (ClutterActor *self)
     }
 #endif /* CLUTTER_ENABLE_DEBUG */
 
+  if (!CLUTTER_ACTOR_IS_MAPPED (self) &&
+      self->priv->in_cloned_branch == 0 &&
+      !clutter_actor_has_mapped_clones (self))
+    {
+      CLUTTER_NOTE (PAINT,
+                    "Skipping queue_relayout('%s'): mapped=%s, "
+                    "mapped_clones=%s, "
+                    "in_cloned_branch=%s\n",
+                    _clutter_actor_get_debug_name (self),
+                    CLUTTER_ACTOR_IS_MAPPED (self) ? "yes" : "no",
+                    clutter_actor_has_mapped_clones (self) ? "yes" : "no",
+                    self->priv->in_cloned_branch != 0 ? "yes" : "no");
+      return;
+    }
+
   _clutter_actor_queue_relayout_on_clones (self);
 
   g_signal_emit (self, actor_signals[QUEUE_RELAYOUT], 0);


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