[mutter] clutter/stage: Rename update_resource_scales to clear_stage_views



commit 8127494e5245b5ddf22918cc4ab1dfbc761e1375
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Fri Apr 10 12:33:35 2020 +0200

    clutter/stage: Rename update_resource_scales to clear_stage_views
    
    When the stage views the stage is shown on are changed, ClutterStage
    currently provides a clutter_stage_update_resource_scales() method
    that allows invalidating the resource scales of all actors. With the new
    stage-views API that's going to be added to ClutterActor, we also need a
    method to invalidate the stage-views lists of actors in case the stage
    views are rebuilt and fortunately we can re-use the infrastructure for
    invalidating resource scales for that.
    
    So since resource scales depend on the stage views an actor is on,
    rename clutter_stage_update_resource_scales() and related methods to
    clutter_stage_clear_stage_views(), which also covers resource scales.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1196

 clutter/clutter/clutter-actor-private.h           |  2 +-
 clutter/clutter/clutter-actor.c                   | 10 +++++-----
 clutter/clutter/clutter-mutter.h                  |  2 +-
 clutter/clutter/clutter-stage.c                   |  4 ++--
 src/backends/native/meta-stage-native.c           |  2 +-
 src/backends/x11/nested/meta-backend-x11-nested.c |  2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor-private.h b/clutter/clutter/clutter-actor-private.h
index 9ff4b2d4bd..3b6a4153bd 100644
--- a/clutter/clutter/clutter-actor-private.h
+++ b/clutter/clutter/clutter-actor-private.h
@@ -313,7 +313,7 @@ void                            _clutter_actor_detach_clone
 void                            _clutter_actor_queue_redraw_on_clones                   (ClutterActor 
*actor);
 void                            _clutter_actor_queue_relayout_on_clones                 (ClutterActor 
*actor);
 void                            _clutter_actor_queue_only_relayout                      (ClutterActor 
*actor);
-void                            _clutter_actor_queue_update_resource_scale_recursive    (ClutterActor 
*actor);
+void                            clutter_actor_clear_stage_views_recursive               (ClutterActor 
*actor);
 
 gboolean                        _clutter_actor_get_real_resource_scale                  (ClutterActor *actor,
                                                                                          float        
*resource_scale);
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 4d79e88bac..5ea4cc1c9e 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -17517,20 +17517,20 @@ _clutter_actor_compute_resource_scale (ClutterActor *self,
 }
 
 static ClutterActorTraverseVisitFlags
-queue_update_resource_scale_cb (ClutterActor *actor,
-                                int           depth,
-                                void         *user_data)
+clear_stage_views_cb (ClutterActor *actor,
+                      int           depth,
+                      gpointer      user_data)
 {
   actor->priv->needs_compute_resource_scale = TRUE;
   return CLUTTER_ACTOR_TRAVERSE_VISIT_CONTINUE;
 }
 
 void
-_clutter_actor_queue_update_resource_scale_recursive (ClutterActor *self)
+clutter_actor_clear_stage_views_recursive (ClutterActor *self)
 {
   _clutter_actor_traverse (self,
                            CLUTTER_ACTOR_TRAVERSE_DEPTH_FIRST,
-                           queue_update_resource_scale_cb,
+                           clear_stage_views_cb,
                            NULL,
                            NULL);
 }
diff --git a/clutter/clutter/clutter-mutter.h b/clutter/clutter/clutter-mutter.h
index d5dbf89e6c..cc1ba9a972 100644
--- a/clutter/clutter/clutter-mutter.h
+++ b/clutter/clutter/clutter-mutter.h
@@ -75,7 +75,7 @@ CLUTTER_EXPORT
 void clutter_stage_thaw_updates (ClutterStage *stage);
 
 CLUTTER_EXPORT
-void clutter_stage_update_resource_scales (ClutterStage *stage);
+void clutter_stage_clear_stage_views (ClutterStage *stage);
 
 CLUTTER_EXPORT
 void clutter_stage_view_assign_next_scanout (ClutterStageView *stage_view,
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 1c5f5685af..5326b1cc26 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -4380,9 +4380,9 @@ clutter_stage_peek_stage_views (ClutterStage *stage)
 }
 
 void
-clutter_stage_update_resource_scales (ClutterStage *stage)
+clutter_stage_clear_stage_views (ClutterStage *stage)
 {
-  _clutter_actor_queue_update_resource_scale_recursive (CLUTTER_ACTOR (stage));
+  clutter_actor_clear_stage_views_recursive (CLUTTER_ACTOR (stage));
 }
 
 GList *
diff --git a/src/backends/native/meta-stage-native.c b/src/backends/native/meta-stage-native.c
index 9b9c45ef30..9a3d11cb9d 100644
--- a/src/backends/native/meta-stage-native.c
+++ b/src/backends/native/meta-stage-native.c
@@ -140,7 +140,7 @@ meta_stage_native_rebuild_views (MetaStageNative *stage_native)
   ClutterActor *stage = meta_backend_get_stage (backend);
 
   meta_renderer_rebuild_views (renderer);
-  clutter_stage_update_resource_scales (CLUTTER_STAGE (stage));
+  clutter_stage_clear_stage_views (CLUTTER_STAGE (stage));
   ensure_frame_callbacks (stage_native);
 }
 
diff --git a/src/backends/x11/nested/meta-backend-x11-nested.c 
b/src/backends/x11/nested/meta-backend-x11-nested.c
index 37d611eb34..009a809787 100644
--- a/src/backends/x11/nested/meta-backend-x11-nested.c
+++ b/src/backends/x11/nested/meta-backend-x11-nested.c
@@ -87,7 +87,7 @@ meta_backend_x11_nested_update_screen_size (MetaBackend *backend,
   if (meta_is_stage_views_enabled ())
     {
       meta_renderer_rebuild_views (renderer);
-      clutter_stage_update_resource_scales (CLUTTER_STAGE (stage));
+      clutter_stage_clear_stage_views (CLUTTER_STAGE (stage));
     }
   clutter_actor_set_size (stage, width, height);
 }


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