[mutter/wip/carlosg/empty-invalidations: 1/2] clutter/cogl: Store empty clip regions for buffer age



commit 367366075c64549e2b130601775b57495deb18c7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 25 16:32:29 2019 +0200

    clutter/cogl: Store empty clip regions for buffer age
    
    As we do not prevent the SwapBuffers call from happening, those also
    do count. Results in clip area calculations to be right for monitors
    that previously did not get invalidated.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/888

 clutter/clutter/cogl/clutter-stage-cogl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 3d0af3348..99b54e5db 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -781,12 +781,13 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
   else
     use_clipped_redraw = FALSE;
 
+  cairo_region_get_extents (fb_clip_region, &clip_rect);
   clip_region_empty = may_use_clipped_redraw && cairo_region_is_empty (fb_clip_region);
 
   swap_with_damage = FALSE;
   if (has_buffer_age)
     {
-      if (use_clipped_redraw && !clip_region_empty)
+      if (use_clipped_redraw)
         {
           int age;
 


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