clutter/stage: Move pick cache invalidation out of setup
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
This commit is contained in:
parent
cf9d06164d
commit
63d05565f6
@ -776,12 +776,6 @@ setup_view_for_paint (ClutterStage *stage,
|
|||||||
float viewport[4];
|
float viewport[4];
|
||||||
cairo_rectangle_int_t geom;
|
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);
|
_clutter_stage_window_get_geometry (priv->impl, &geom);
|
||||||
|
|
||||||
viewport[0] = priv->viewport[0];
|
viewport[0] = priv->viewport[0];
|
||||||
@ -829,10 +823,17 @@ clutter_stage_do_paint_view (ClutterStage *stage,
|
|||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
const cairo_region_t *redraw_clip)
|
const cairo_region_t *redraw_clip)
|
||||||
{
|
{
|
||||||
|
ClutterStagePrivate *priv = stage->priv;
|
||||||
ClutterPaintContext *paint_context;
|
ClutterPaintContext *paint_context;
|
||||||
cairo_rectangle_int_t clip_rect;
|
cairo_rectangle_int_t clip_rect;
|
||||||
graphene_frustum_t clip_frustum;
|
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);
|
cairo_region_get_extents (redraw_clip, &clip_rect);
|
||||||
setup_view_for_paint (stage, view, &clip_rect, &clip_frustum);
|
setup_view_for_paint (stage, view, &clip_rect, &clip_frustum);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user