[gtk/gtk-3-24: 6/10] [quartz] Draw needs_display_region if available
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 6/10] [quartz] Draw needs_display_region if available
- Date: Sat, 21 May 2022 13:15:22 +0000 (UTC)
commit 2d3eb0c6a77a7480f17ceda5f6dfa0dd03f985e1
Author: John Ralls <jralls ceridwen us>
Date: Sun May 8 11:32:59 2022 -0700
[quartz] Draw needs_display_region if available
gdk/quartz/GdkQuartzView.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index c20c5de83a..557451606c 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -344,31 +344,33 @@
return;
}
- /* Clear our own bookkeeping of regions that need display */
if (impl->needs_display_region)
{
+ _gdk_window_process_updates_recurse (gdk_window, impl->needs_display_region);
cairo_region_destroy (impl->needs_display_region);
impl->needs_display_region = NULL;
}
-
- [self getRectsBeingDrawn: &drawn_rects count: &count];
- region = cairo_region_create ();
-
- for (i = 0; i < count; i++)
+ else
{
- gdk_rect.x = drawn_rects[i].origin.x;
- gdk_rect.y = drawn_rects[i].origin.y;
- gdk_rect.width = drawn_rects[i].size.width;
- gdk_rect.height = drawn_rects[i].size.height;
+ [self getRectsBeingDrawn: &drawn_rects count: &count];
+ cairo_region_t* region = cairo_region_create ();
- cairo_region_union_rectangle (region, &gdk_rect);
- }
+ for (i = 0; i < count; i++)
+ {
+ gdk_rect.x = drawn_rects[i].origin.x;
+ gdk_rect.y = drawn_rects[i].origin.y;
+ gdk_rect.width = drawn_rects[i].size.width;
+ gdk_rect.height = drawn_rects[i].size.height;
+
+ cairo_region_union_rectangle (region, &gdk_rect);
+ }
- impl->in_paint_rect_count++;
- _gdk_window_process_updates_recurse (gdk_window, region);
- impl->in_paint_rect_count--;
+ impl->in_paint_rect_count++;
+ _gdk_window_process_updates_recurse (gdk_window, region);
+ impl->in_paint_rect_count--;
- cairo_region_destroy (region);
+ cairo_region_destroy (region);
+ }
if (needsInvalidateShadow)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]