[mutter] window-actor: Speed up mask creation



commit 5d12f00b3b769b90adb89cafeb5725f350ea7cc6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jan 16 10:16:58 2013 -0500

    window-actor: Speed up mask creation
    
    Due to a conditional error, meta_region_builder_add_rectangle was called
    on every single blank pixel, rather than at the end of spans. With the new
    rename, it's fairly clear to see the error. Fix the check to ensure that
    we no longer make extraneous calls to meta_region_builder_add_rectangle.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691874

 src/compositor/meta-window-actor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 05acb53..27ee398 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -2117,7 +2117,7 @@ scan_visible_region (guchar         *mask_data,
               while (mask_data[y * stride + x2] == 255 && x2 < (rect.x + rect.width))
                 x2++;
 
-              if (x2 > 0)
+              if (x2 > x)
                 {
                   meta_region_builder_add_rectangle (&builder, x, y, x2 - x, 1);
                   x = x2;



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