[clutter/clutter-1.22] actor: Bail when setting the same content



commit 1e2132eca49347a2d8e519ab45780c52952c3e9e
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Dec 13 14:28:46 2014 +0000

    actor: Bail when setting the same content
    
    No need to do all the work, if the content instance is the same.

 clutter/clutter-actor.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 5c9613b..652721c 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -19575,6 +19575,9 @@ clutter_actor_set_content (ClutterActor   *self,
 
   priv = self->priv;
 
+  if (priv->content == content)
+    return;
+
   if (priv->content != NULL)
     {
       _clutter_content_detached (priv->content, self);


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