mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 05:12:15 +00:00
Don't queue redraws when reallocating actor that haven't moved
When support for implicit animation of actor position was added, the optimization for not queueing when allocating an actor back to the same location was lost. This optimization is important since when we are hierarchically allocating down from the top of the stage we constantly reallocate the actors at the top of the hierarchy back to the same place. https://bugzilla.gnome.org/show_bug.cgi?id=719368
This commit is contained in:
parent
0d0248b31f
commit
9a471cf08d
@ -8755,7 +8755,9 @@ clutter_actor_allocate_internal (ClutterActor *self,
|
|||||||
|
|
||||||
CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT);
|
CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT);
|
||||||
|
|
||||||
clutter_actor_queue_redraw (self);
|
/* Caller should call clutter_actor_queue_redraw() if needed
|
||||||
|
* for that particular case.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -8864,6 +8866,14 @@ clutter_actor_allocate (ClutterActor *self,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!stage_allocation_changed)
|
||||||
|
{
|
||||||
|
/* If the actor didn't move but needs_allocation is set, we just
|
||||||
|
* need to allocate the children */
|
||||||
|
clutter_actor_allocate_internal (self, &real_allocation, flags);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* When ABSOLUTE_ORIGIN_CHANGED is passed in to
|
/* When ABSOLUTE_ORIGIN_CHANGED is passed in to
|
||||||
* clutter_actor_allocate(), it indicates whether the parent has its
|
* clutter_actor_allocate(), it indicates whether the parent has its
|
||||||
* absolute origin moved; when passed in to ClutterActor::allocate()
|
* absolute origin moved; when passed in to ClutterActor::allocate()
|
||||||
@ -12665,6 +12675,7 @@ clutter_actor_set_animatable_property (ClutterActor *actor,
|
|||||||
clutter_actor_allocate_internal (actor,
|
clutter_actor_allocate_internal (actor,
|
||||||
g_value_get_boxed (value),
|
g_value_get_boxed (value),
|
||||||
actor->priv->allocation_flags);
|
actor->priv->allocation_flags);
|
||||||
|
clutter_actor_queue_redraw (actor);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_Z_POSITION:
|
case PROP_Z_POSITION:
|
||||||
|
Loading…
Reference in New Issue
Block a user