[gimp/gtk3-port: 93/130] app: fix canvas double buffering using cairo_push, pop_group()



commit 2730f32e2a3c6593dc3fc19fbf31ab1bccfcd396
Author: Michael Natterer <mitch gimp org>
Date:   Wed Oct 20 14:06:30 2010 +0200

    app: fix canvas double buffering using cairo_push,pop_group()

 app/display/gimpdisplayshell-callbacks.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index d7e8f5d..a46a8b6 100644
--- a/app/display/gimpdisplayshell-callbacks.c
+++ b/app/display/gimpdisplayshell-callbacks.c
@@ -400,15 +400,18 @@ gimp_display_shell_canvas_draw (GtkWidget        *widget,
         {
           gimp_display_shell_pause (shell);
 
-#if 0
           if (gimp_display_shell_is_double_buffered (shell))
-            gdk_window_begin_paint_region (eevent->window, eevent->region);
-#endif
-        }
+            {
+              cairo_push_group (cr);
+            }
 
-      if (gimp_display_get_image (shell->display))
-        {
           gimp_display_shell_canvas_draw_image (shell, cr);
+
+          if (gimp_display_shell_is_double_buffered (shell))
+            {
+              cairo_pop_group_to_source (cr);
+              cairo_paint (cr);
+            }
         }
       else
         {
@@ -433,11 +436,6 @@ gimp_display_shell_canvas_draw_after (GtkWidget        *widget,
     {
       if (gimp_display_get_image (shell->display))
         {
-#if 0
-          if (gimp_display_shell_is_double_buffered (shell))
-            gdk_window_end_paint (eevent->window);
-#endif
-
           gimp_display_shell_resume (shell);
         }
     }



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