[mutter/wip/carlosg/avoid-parent-relayouts: 289/289] clutter: Only redraw affected portions on parent widget on show/hide



commit f98de7e93dd101158854da47a61dc64bf973af1d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Aug 10 21:33:50 2018 +0200

    clutter: Only redraw affected portions on parent widget on show/hide
    
    If we are lucky enough and the parent actor has the CLUTTER_ACTOR_NO_LAYOUT
    flag, we would skip the relayout, but still redraw the parent actor in its
    entirety.
    
    In these cases, we can at least just redraw the area affected by the actor
    being shown/hidden.

 clutter/clutter/clutter-actor.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 6913f315a..1a4cfb562 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -1793,7 +1793,7 @@ clutter_actor_show (ClutterActor *self)
   g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
 
   if (priv->parent != NULL)
-    clutter_actor_queue_redraw (priv->parent);
+    clutter_actor_queue_redraw (self);
 
   g_object_thaw_notify (G_OBJECT (self));
 }
@@ -1918,8 +1918,7 @@ clutter_actor_hide (ClutterActor *self)
   g_signal_emit (self, actor_signals[HIDE], 0);
   g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
 
-  if (priv->parent != NULL)
-    clutter_actor_queue_redraw (priv->parent);
+  clutter_actor_queue_redraw_on_parent (self);
 
   g_object_thaw_notify (G_OBJECT (self));
 }


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