|
|
b9a760 |
From 2e85269368a815435f107f1b7dfbc15c7e806fa6 Mon Sep 17 00:00:00 2001
|
|
|
b9a760 |
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
|
|
b9a760 |
Date: Tue, 26 Nov 2013 11:04:27 -0500
|
|
|
b9a760 |
Subject: [PATCH] Don't queue redraws when reallocating actor that haven't
|
|
|
b9a760 |
moved
|
|
|
b9a760 |
|
|
|
b9a760 |
When support for implicit animation of actor position was added,
|
|
|
b9a760 |
the optimization for not queueing when allocating an actor back
|
|
|
b9a760 |
to the same location was lost. This optimization is important
|
|
|
b9a760 |
since when we are hierarchically allocating down from the top of
|
|
|
b9a760 |
the stage we constantly reallocate the actors at the top of the
|
|
|
b9a760 |
hierarchy back to the same place.
|
|
|
b9a760 |
|
|
|
b9a760 |
https://bugzilla.gnome.org/show_bug.cgi?id=719368
|
|
|
b9a760 |
---
|
|
|
b9a760 |
clutter/clutter-actor.c | 13 ++++++++++++-
|
|
|
b9a760 |
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
|
b9a760 |
|
|
|
b9a760 |
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
|
|
|
b9a760 |
index 4504ac6..b371183 100644
|
|
|
b9a760 |
--- a/clutter/clutter-actor.c
|
|
|
b9a760 |
+++ b/clutter/clutter-actor.c
|
|
|
b9a760 |
@@ -9738,7 +9738,9 @@ clutter_actor_allocate_internal (ClutterActor *self,
|
|
|
b9a760 |
|
|
|
b9a760 |
CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT);
|
|
|
b9a760 |
|
|
|
b9a760 |
- clutter_actor_queue_redraw (self);
|
|
|
b9a760 |
+ /* Caller should call clutter_actor_queue_redraw() if needed
|
|
|
b9a760 |
+ * for that particular case.
|
|
|
b9a760 |
+ */
|
|
|
b9a760 |
}
|
|
|
b9a760 |
|
|
|
b9a760 |
/**
|
|
|
b9a760 |
@@ -9847,6 +9849,14 @@ clutter_actor_allocate (ClutterActor *self,
|
|
|
b9a760 |
return;
|
|
|
b9a760 |
}
|
|
|
b9a760 |
|
|
|
b9a760 |
+ if (!stage_allocation_changed)
|
|
|
b9a760 |
+ {
|
|
|
b9a760 |
+ /* If the actor didn't move but needs_allocation is set, we just
|
|
|
b9a760 |
+ * need to allocate the children */
|
|
|
b9a760 |
+ clutter_actor_allocate_internal (self, &real_allocation, flags);
|
|
|
b9a760 |
+ return;
|
|
|
b9a760 |
+ }
|
|
|
b9a760 |
+
|
|
|
b9a760 |
/* When ABSOLUTE_ORIGIN_CHANGED is passed in to
|
|
|
b9a760 |
* clutter_actor_allocate(), it indicates whether the parent has its
|
|
|
b9a760 |
* absolute origin moved; when passed in to ClutterActor::allocate()
|
|
|
b9a760 |
@@ -14718,6 +14728,7 @@ clutter_actor_set_animatable_property (ClutterActor *actor,
|
|
|
b9a760 |
clutter_actor_allocate_internal (actor,
|
|
|
b9a760 |
g_value_get_boxed (value),
|
|
|
b9a760 |
actor->priv->allocation_flags);
|
|
|
b9a760 |
+ clutter_actor_queue_redraw (actor);
|
|
|
b9a760 |
break;
|
|
|
b9a760 |
|
|
|
b9a760 |
case PROP_DEPTH:
|
|
|
b9a760 |
--
|
|
|
b9a760 |
1.8.5.3
|
|
|
b9a760 |
|