[mutter/wip/carlosg/avoid-parent-relayouts: 3/3] clutter: Only redraw affected portions on parent widget on show/hide
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/avoid-parent-relayouts: 3/3] clutter: Only redraw affected portions on parent widget on show/hide
- Date: Wed, 5 Dec 2018 18:56:56 +0000 (UTC)
commit 9b4953740b3f8f9a432f1d1f53ca607e99dcf41f
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 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 6913f315a..521d4264c 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,10 @@ 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)
+ if (priv->parent != NULL && priv->needs_allocation)
clutter_actor_queue_redraw (priv->parent);
+ else
+ 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]