From b6fa26cf4546510fe1bff37928f3995ecf3c6f00 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 9 Oct 2020 20:10:51 -0300 Subject: [PATCH] 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 a0640263e..c50787e39 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;