[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Re: Knowing if an XserverRegion is empty
From: iain <iain () openedhand ! com>
Date: 2007-11-30 16:41:02
Message-ID: 1196440862.6267.16.camel () lot49
[Download RAW message or body]
On Fri, 2007-11-30 at 08:28 -0800, Keith Packard wrote:
> 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.
Well, each subtraction is followed by setting clips on Pictures and
calling XRenderComposite a couple of times, but I suppose if calling
XRenderComposite with an empty XserverRegion as clip isn't slow it
probably won't matter.
Thanks,
iain
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic