Optimize remove_child_area for children outside region

If a child is totally outside the current region, bail early instead
of doing costly calculations to subtract the child region.
This commit is contained in:
Alexander Larsson 2009-07-19 22:35:25 +02:00
parent ef8ce08edf
commit a057c03889

View File

@ -636,6 +636,10 @@ remove_child_area (GdkWindowObject *private,
r.width = child->width;
r.height = child->height;
/* Bail early if child totally outside region */
if (gdk_region_rect_in (region, &r) == GDK_OVERLAP_RECTANGLE_OUT)
continue;
child_region = gdk_region_rectangle (&r);
if (child->shape)