forked from AuroraMiddleware/gtk
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:
parent
ef8ce08edf
commit
a057c03889
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user