trap shaped x11 clients and prevent compositor blocking with high rect count
authorMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 14 Oct 2015 16:51:45 +0000 (12:51 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 14 Oct 2015 16:59:14 +0000 (12:59 -0400)
commit984d664eefb2e517920a5ae1710e55d5e49f38c8
treeb53f0364832c79083c35def3f4075801e25d83e5
parent00895ca0140efe8c88bac3e44424946ac47d5a49
trap shaped x11 clients and prevent compositor blocking with high rect count

in the case where a shaped window with many rects exists, there is a high
probability of the damage rect count being huge, leading to massive blocking for
each frame as the compositor attempts to fetch all of these rects from the xserver.

instead, the compositor can shortcut this by forcing a full-window damage any time
the rect count is sufficiently high, trading a blocking socket operation for some
amount of (potential) overdraw.

testing in affected scenarios has shown huge improvements: where previously the entire
compositor would lock up, things work as expected now

see https://bugzilla.mozilla.org/show_bug.cgi?id=1214746 for a sample case
src/bin/e_comp_x.c