[gtk+] Fix up rendering of non-double-buffered overlays
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix up rendering of non-double-buffered overlays
- Date: Thu, 1 Mar 2012 13:49:43 +0000 (UTC)
commit fd0450b4e7415eb548538773b3ba93595b2dba26
Author: Alexander Larsson <alexl redhat com>
Date: Thu Mar 1 14:14:33 2012 +0100
Fix up rendering of non-double-buffered overlays
My previous fix for this broke the progress bar in epiphany. This fix
makes it work again, and keeps the gimp bug fixed.
Basically, whenever we do a non-double-buffered rendering we have to
flush the entire window as it might be drawn outside the double
buffering machinery.
gdk/gdkwindow.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index cf8203b..0fc68fe 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2763,6 +2763,12 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
region = cairo_region_copy (window->clip_region_with_children);
cairo_region_translate (region, window->abs_x, window->abs_y);
+
+ if (paint->flushed == NULL)
+ paint->flushed = cairo_region_copy (region);
+ else
+ cairo_region_union (paint->flushed, region);
+
cairo_region_intersect (region, paint->region);
/* Don't flush active double buffers, as that may show partially done
@@ -2789,11 +2795,9 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
cairo_destroy (cr);
-
- paint->flushed = region;
}
- else
- cairo_region_destroy (region);
+
+ cairo_region_destroy (region);
}
/* Ends an implicit paint, paired with gdk_window_begin_implicit_paint returning TRUE */
@@ -2984,9 +2988,9 @@ gdk_window_begin_paint_region (GdkWindow *window,
if (implicit_paint)
{
cairo_region_t *flushed = cairo_region_copy (implicit_paint->flushed);
- cairo_region_intersect (flushed, region);
/* Convert from impl coords */
cairo_region_translate (flushed, -window->abs_x, -window->abs_y);
+ cairo_region_intersect (flushed, paint->region);
gdk_cairo_region (cr, flushed);
cairo_clip (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]