[mutter/gbsneto/split-pick-paint: 5/8] clutter/stage: Refactor view setup code



commit ff8ed70f84e573bb6829f57da1624e3dbbe902b6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Oct 17 17:03:26 2019 +0200

    clutter/stage: Refactor view setup code
    
    We'll share it between pick and paint, so refactor
    the framebuffer and view setup code from paint
    into a new function.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/865

 clutter/clutter/clutter-stage.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 4b051afc3..20c73c810 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -892,9 +892,9 @@ _clutter_stage_update_active_framebuffer (ClutterStage    *stage,
  * be able to cull them.
  */
 static void
-clutter_stage_do_paint_view (ClutterStage                *stage,
-                             ClutterStageView            *view,
-                             const cairo_rectangle_int_t *clip)
+setup_view_for_pick_or_paint (ClutterStage                *stage,
+                              ClutterStageView            *view,
+                              const cairo_rectangle_int_t *clip)
 {
   ClutterStagePrivate *priv = stage->priv;
   CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
@@ -949,6 +949,14 @@ clutter_stage_do_paint_view (ClutterStage                *stage,
 
   _clutter_stage_paint_volume_stack_free_all (stage);
   _clutter_stage_update_active_framebuffer (stage, framebuffer);
+}
+
+static void
+clutter_stage_do_paint_view (ClutterStage                *stage,
+                             ClutterStageView            *view,
+                             const cairo_rectangle_int_t *clip)
+{
+  setup_view_for_pick_or_paint (stage, view, clip);
   clutter_actor_paint (CLUTTER_ACTOR (stage));
 }
 


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