summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-19 13:17:02 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-03-19 13:17:02 -0400
commit830efa6ce2611860c3c0ad264a2c6ac0d1810b14 (patch)
tree77a9347c4167c7f0593dc31c6f64c07b91423bec
parenta33e32ef60a8c26b86da5cb0af3a680d6ce0832c (diff)
downloadgtk+-830efa6ce2611860c3c0ad264a2c6ac0d1810b14.tar.gz
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
-rw-r--r--gsk/ngl/gsknglrenderer.c5
1 files changed, 4 insertions, 1 deletions
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;