[gtk+] GdkWindowWayland: draw, then damage, then commit



commit d5310f936727077839cbe7771d37769b42f41b44
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Apr 23 14:39:48 2013 -0400

    GdkWindowWayland: draw, then damage, then commit
    
    When exposing an area, we were individually damaging and committing
    each rectangle, *before* drawing. Surprisingly, this almost worked.
    Order things right and only commit once.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698864

 gdk/wayland/gdkwindow-wayland.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index a04915e..d8d35c2 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1626,16 +1626,17 @@ gdk_wayland_window_process_updates_recurse (GdkWindow      *window,
   if (impl->cairo_surface)
     gdk_wayland_window_attach_image (window);
 
+  _gdk_window_process_updates_recurse (window, region);
+
   n = cairo_region_num_rectangles(region);
   for (i = 0; i < n; i++)
     {
       cairo_region_get_rectangle (region, i, &rect);
       wl_surface_damage (impl->surface,
                          rect.x, rect.y, rect.width, rect.height);
-      wl_surface_commit(impl->surface);
     }
 
-  _gdk_window_process_updates_recurse (window, region);
+  wl_surface_commit (impl->surface);
 }
 
 static void


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