diff options
author | Jonas Dreßler <verdre@v0yd.nl> | 2020-10-16 23:27:04 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-10-20 15:27:43 +0000 |
commit | 717b857bd8e9142354dfac4107946e8179eda2b7 (patch) | |
tree | 4ba338f6808a123355a66b7c2b951ba905020d26 | |
parent | 9b502150088de067ce6625f262cb7fd402074997 (diff) | |
download | mutter-717b857bd8e9142354dfac4107946e8179eda2b7.tar.gz |
clutter/actor: Use separate priv pointer in clutter_actor_real_(un)map
We're accessing self->priv quite often in those functions, it makes
sense to use a separate variable for it.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1366
-rw-r--r-- | clutter/clutter/clutter-actor.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index dd92a675c..8fde0f550 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -1610,6 +1610,7 @@ queue_update_stage_views (ClutterActor *actor) static void clutter_actor_real_map (ClutterActor *self) { + ClutterActorPrivate *priv = self->priv; ClutterActor *iter; g_assert (!CLUTTER_ACTOR_IS_MAPPED (self)); @@ -1619,19 +1620,19 @@ clutter_actor_real_map (ClutterActor *self) CLUTTER_ACTOR_SET_FLAGS (self, CLUTTER_ACTOR_MAPPED); - if (self->priv->unmapped_paint_branch_counter == 0) + if (priv->unmapped_paint_branch_counter == 0) { - self->priv->needs_paint_volume_update = TRUE; + priv->needs_paint_volume_update = TRUE; /* We skip unmapped actors when updating the stage-views list, so if * an actors list got invalidated while it was unmapped make sure to * set priv->needs_update_stage_views to TRUE for all actors up the * hierarchy now. */ - if (self->priv->needs_update_stage_views) + if (priv->needs_update_stage_views) { /* Avoid the early return in queue_update_stage_views() */ - self->priv->needs_update_stage_views = FALSE; + priv->needs_update_stage_views = FALSE; queue_update_stage_views (self); } } @@ -1641,7 +1642,7 @@ clutter_actor_real_map (ClutterActor *self) */ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_MAPPED]); - for (iter = self->priv->first_child; + for (iter = priv->first_child; iter != NULL; iter = iter->priv->next_sibling) { @@ -1725,7 +1726,7 @@ clutter_actor_real_unmap (ClutterActor *self) CLUTTER_NOTE (ACTOR, "Unmapping actor '%s'", _clutter_actor_get_debug_name (self)); - for (iter = self->priv->first_child; + for (iter = priv->first_child; iter != NULL; iter = iter->priv->next_sibling) { @@ -1734,7 +1735,7 @@ clutter_actor_real_unmap (ClutterActor *self) CLUTTER_ACTOR_UNSET_FLAGS (self, CLUTTER_ACTOR_MAPPED); - if (self->priv->unmapped_paint_branch_counter == 0) + if (priv->unmapped_paint_branch_counter == 0) { /* clear the contents of the last paint volume, so that hiding + moving + * showing will not result in the wrong area being repainted |