[mutter/gnome-3-38] clutter/actor: Use separate priv pointer in clutter_actor_real_(un)map



commit 5aca454d926a6f89de36c17b28ca4457edd88528
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Fri Oct 16 21:27:04 2020 +0000

    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
    
    
    (cherry picked from commit 717b857bd8e9142354dfac4107946e8179eda2b7)

 clutter/clutter/clutter-actor.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index db3bcc06af..4e5496a0ec 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -1600,6 +1600,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));
@@ -1609,19 +1610,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);
         }
     }
@@ -1631,7 +1632,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)
     {
@@ -1715,7 +1716,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)
     {
@@ -1724,7 +1725,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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]