From 63d05565f6e43386ab4e4fc7da09b288ce159efe Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 9 Oct 2020 20:54:28 -0300 Subject: [PATCH] clutter/stage: Move pick cache invalidation out of setup https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489 --- clutter/clutter/clutter-stage.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index b398105e7..ab1877f1d 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -776,12 +776,6 @@ setup_view_for_paint (ClutterStage *stage, float viewport[4]; cairo_rectangle_int_t geom; - /* Any mode of painting/picking invalidates the pick cache, unless we're - * in the middle of building it. So we reset the cached flag but don't - * completely clear the pick stack. - */ - priv->cached_pick_mode = CLUTTER_PICK_NONE; - _clutter_stage_window_get_geometry (priv->impl, &geom); viewport[0] = priv->viewport[0]; @@ -829,10 +823,17 @@ clutter_stage_do_paint_view (ClutterStage *stage, ClutterStageView *view, const cairo_region_t *redraw_clip) { + ClutterStagePrivate *priv = stage->priv; ClutterPaintContext *paint_context; cairo_rectangle_int_t clip_rect; graphene_frustum_t clip_frustum; + /* Any mode of painting/picking invalidates the pick cache, unless we're + * in the middle of building it. So we reset the cached flag but don't + * completely clear the pick stack. + */ + priv->cached_pick_mode = CLUTTER_PICK_NONE; + cairo_region_get_extents (redraw_clip, &clip_rect); setup_view_for_paint (stage, view, &clip_rect, &clip_frustum);