[mutter/gbsneto/graphene-frustrum: 13/19] clutter/stage: Don't setup view on pick




commit 541ac0cbe1ddfe4e7edac22347647a01894213d9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Oct 9 20:10:51 2020 -0300

    clutter/stage: Don't setup view on pick
    
    While refactoring the clipping planes / frustum code, it became more and
    more evident that we do not need to update them while picking. Picking
    nowadays goes through a completely different code path, that does not
    rely on paint volume culling.
    
    While it might be interesting to eventually also cull out based on paint
    volumes, it certainly won't go through the painting code anymore.
    
    Remove setting up the view when picking, and rename functions appropriatedly.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489

 clutter/clutter/clutter-stage.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index f001db557c..3de2b7809b 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -772,9 +772,9 @@ _cogl_util_get_eye_planes_for_screen_poly (float                    *polygon,
  * be able to cull them.
  */
 static void
-setup_view_for_pick_or_paint (ClutterStage                *stage,
-                              ClutterStageView            *view,
-                              const cairo_rectangle_int_t *clip)
+setup_view_for_paint (ClutterStage                *stage,
+                      ClutterStageView            *view,
+                      const cairo_rectangle_int_t *clip)
 {
   ClutterStagePrivate *priv = stage->priv;
   cairo_rectangle_int_t view_layout;
@@ -842,7 +842,7 @@ clutter_stage_do_paint_view (ClutterStage         *stage,
                                                       CLUTTER_PAINT_FLAG_NONE);
 
   cairo_region_get_extents (redraw_clip, &clip_rect);
-  setup_view_for_pick_or_paint (stage, view, &clip_rect);
+  setup_view_for_paint (stage, view, &clip_rect);
 
   clutter_actor_paint (CLUTTER_ACTOR (stage), paint_context);
   clutter_paint_context_destroy (paint_context);
@@ -1484,7 +1484,7 @@ _clutter_stage_do_pick_on_view (ClutterStage     *stage,
       pick_context = clutter_pick_context_new_for_view (view);
 
       context->pick_mode = mode;
-      setup_view_for_pick_or_paint (stage, view, NULL);
+      priv->cached_pick_mode = CLUTTER_PICK_NONE;
       clutter_actor_pick (CLUTTER_ACTOR (stage), pick_context);
       context->pick_mode = CLUTTER_PICK_NONE;
       priv->cached_pick_mode = mode;


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