[gtk] Revert "ngl: Remove duplicate check"



commit 830efa6ce2611860c3c0ad264a2c6ac0d1810b14
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 19 13:17:02 2021 -0400

    Revert "ngl: Remove duplicate check"
    
    This reverts commit 1fd534ef1ee0f5e62dbdcf1f82ed7dc287d77d13.
    
    This change revealed that we are not treating damage regions
    correctly, and we regularly end up with

 gsk/ngl/gsknglrenderer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderer.c b/gsk/ngl/gsknglrenderer.c
index 4c6a077ab3..66edc98d5d 100644
--- a/gsk/ngl/gsknglrenderer.c
+++ b/gsk/ngl/gsknglrenderer.c
@@ -173,7 +173,10 @@ get_render_region (GdkSurface   *surface,
    */
   damage = gdk_draw_context_get_frame_region (GDK_DRAW_CONTEXT (context));
 
-  /* If the extents match the full-scene, return NULL */
+  if (cairo_region_contains_rectangle (damage, &whole_surface) == CAIRO_REGION_OVERLAP_IN)
+    return NULL;
+
+  /* If the extents match the full-scene, do the same as above */
   cairo_region_get_extents (damage, &extents);
   if (gdk_rectangle_equal (&extents, &whole_surface))
     return NULL;


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