clutter/stage-cogl: Ensure queued_redraw_clip is not empty

When using `CLUTTER_PAINT=damage-region` highlighting was conspicuously
absent during fullscreen animations like entering or leaving the
overview. That was because `queued_redraw_clip` was empty, because it
had been initialized from `redraw_clip == NULL` (full stage redraw).

Now we paint the damage region as the full view (which it is) instead
of nothing at all.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1890>
This commit is contained in:
Daniel van Vugt 2021-06-09 13:48:57 +08:00
parent dce3aa5c01
commit 97c6a68b0d

View File

@ -541,12 +541,12 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
};
fb_clip_region = cairo_region_create_rectangle (&fb_rect);
g_clear_pointer (&redraw_clip, cairo_region_destroy);
redraw_clip = cairo_region_create_rectangle (&view_rect);
if (G_UNLIKELY (clutter_paint_debug_flags &
CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
queued_redraw_clip = cairo_region_reference (redraw_clip);
g_clear_pointer (&redraw_clip, cairo_region_destroy);
redraw_clip = cairo_region_create_rectangle (&view_rect);
}
g_return_if_fail (!cairo_region_is_empty (fb_clip_region));