From 97c6a68b0d35fbcb03f3cdbd027350070f2877ac Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Wed, 9 Jun 2021 13:48:57 +0800 Subject: [PATCH] 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: --- clutter/clutter/cogl/clutter-stage-cogl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c index 5e81899b0..2fe6bd10e 100644 --- a/clutter/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/clutter/cogl/clutter-stage-cogl.c @@ -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));