[mutter] clutter/stage-cogl: Ensure queued_redraw_clip is not empty



commit 97c6a68b0d35fbcb03f3cdbd027350070f2877ac
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Wed Jun 9 13:48:57 2021 +0800

    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>

 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 5e81899b06..2fe6bd10e0 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));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]