mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
clutter/actor: Pass stage as user_data when unrealizing
We can avoid having to get the stage again for every child of the subtree we're unrealizing by getting the stage once and passing it as user_data to the callbacks. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1356
This commit is contained in:
parent
ae83a61e67
commit
249274c677
@ -2201,7 +2201,7 @@ unrealize_actor_after_children_cb (ClutterActor *self,
|
||||
int depth,
|
||||
void *user_data)
|
||||
{
|
||||
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
|
||||
ClutterActor *stage = user_data;
|
||||
|
||||
/* We want to unset the realized flag only _after_
|
||||
* child actors are unrealized, to maintain invariants.
|
||||
@ -2244,11 +2244,13 @@ unrealize_actor_after_children_cb (ClutterActor *self,
|
||||
static void
|
||||
clutter_actor_unrealize_not_hiding (ClutterActor *self)
|
||||
{
|
||||
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
|
||||
|
||||
_clutter_actor_traverse (self,
|
||||
CLUTTER_ACTOR_TRAVERSE_DEPTH_FIRST,
|
||||
unrealize_actor_before_children_cb,
|
||||
unrealize_actor_after_children_cb,
|
||||
NULL);
|
||||
stage);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user