Cairo makes heavy use of IN when implementing clip surfaces.
Alex Larsson provided a patch to optimize this in:
I'll attach it here. As always, the main challenge with such
a patch is to get it into enough copies of the compositing code
so it doesn't get lost in a merge.
Created attachment 2986 [details] [review]
Patch from Alex Larsson
Reassigning to Billy, as requested.
Fixed in libpixman git.