[gtk+] Don't un-invalidate area that will be immediately invalidated again.



commit f0190474025ae9fce5ed3bd5b7ffe02529f711ef
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Aug 13 13:04:28 2009 +0200

    Don't un-invalidate area that will be immediately invalidated again.
    
    When moving an area we move any invalid region in this area to the
    new place, but there really is no need to remove the old invalid
    area as it would just be invalidated again (being newly exposed).

 gdk/gdkwindow.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index bf56a08..cfb9d9e 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3008,7 +3008,10 @@ move_region_on_impl (GdkWindowObject *private,
       /* Convert from target to source */
       gdk_region_offset (update_area, -dx, -dy);
       gdk_region_intersect (update_area, impl_window->update_area);
-      gdk_region_subtract (impl_window->update_area, update_area);
+      /* We only copy the area, so keep the old update area invalid.
+	 It would be safe to remove it too, as code that uses
+	 move_region_on_impl generally also invalidate the source
+	 area. However, it would just use waste cycles. */
 
       /* Convert back */
       gdk_region_offset (update_area, dx, dy);



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