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
This commit is contained in:
parent
95f3bb3b81
commit
5d12f00b3b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user