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



commit 6f84ca593e2ec29b446f04ee5bfe88ccb8661bb2
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.

 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]