Commit 5d12f00b authored by Jasper St. Pierre's avatar Jasper St. Pierre
Browse files

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
parent 95f3bb3b
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment