Knowing if an XserverRegion is empty

Keith Packard keithp at keithp.com
Fri Nov 30 08:28:48 PST 2007


On Fri, 2007-11-30 at 12:00 +0000, iain wrote:

> I've managed to do this by calling XFixesFetchRegion and then checking
> how many rectangles are returned, but is there any great speed penalty
> for calling this function a lot?

Yes, that requires a round-trip to the X server, which is quite slow.
Note that subtracting a region from an empty region is a fast operation,
so unless you have a lot of subtractions you will avoid, it might well
be faster to do that instead of the round trip.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20071130/3ee6049f/attachment.pgp>


More information about the xorg mailing list