[gtk+/client-side-windows: 40/284] Move flushing code to non-implicit-paint only call.



commit ee4211b9a8e5dbbda1e7a1d4b30c1bbc4f86b30a
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Dec 9 12:26:01 2008 +0100

    Move flushing code to non-implicit-paint only call.
    This is in preparation for other types of buffering
---
 gdk/gdkwindow.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 391079d..750ea1e 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2201,6 +2201,15 @@ gdk_window_free_paint_stack (GdkWindow *window)
     }
 }
 
+/* Flushes all outstanding changes to the window, call this
+ * before drawing directly to the window (i.e. outside a begin/end_paint pair).
+ */
+static void
+gdk_window_flush (GdkWindow *window)
+{
+  gdk_window_flush_implicit_paint (window);
+}
+
 static void
 gdk_window_get_offsets (GdkWindow *window,
 			gint      *x_offset,
@@ -2345,7 +2354,7 @@ setup_clip_for_paint (GdkDrawable *drawable,
 
 
 #define SETUP_DIRECT_GC_CLIP(gc)                            \
-      gdk_window_flush_implicit_paint ((GdkWindow *)drawable);\
+      gdk_window_flush ((GdkWindow *)drawable);\
       setup_clip_for_draw (drawable, gc, old_clip_x, old_clip_y);
 
 #define RESTORE_DIRECT_GC_CLIP(gc)
@@ -3683,7 +3692,7 @@ gdk_window_ref_cairo_surface (GdkDrawable *drawable)
     {
       
       /* This will be drawing directly to the window, so flush implicit paint */
-      gdk_window_flush_implicit_paint ((GdkWindow *)drawable);
+      gdk_window_flush ((GdkWindow *)drawable);
       
       if (!private->cairo_surface)
 	{



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