[Xcb] region code

Jamey Sharp jamey at minilop.net
Wed Nov 15 13:37:51 PST 2006


On Tue, Nov 14, 2006 at 11:53:21PM +0100, Vincent Torri wrote:
> After discussion with Carl Worth, his advice was to look at the miregion 
> implementation of such region code. libpixregion (which is in cairo) or 
> the Region code of Xlib are almost identical to miregion. So I would begin 
> to look at miregion.
> 
> Do you think it could be interesting for xcb to have such a code in, say, 
> the util package ?

No. ;-)

What I think we need is an X-independent region implementation. There's
only one X-specific operation in Xlib's region code, and that's to set a
core graphics context clip from a region. *That* function could go in
xcb-util.

The rest of the region code should go somewhere else. Hosting it on
freedesktop.org probably makes a lot of sense, but not as an XCB
project.

As I understand it, using the miregion code in the X server is better
than using the similar code from Xlib because the miregion version has a
memory optimization for single-rectangle regions. So that does seem like
a good place to start.

I think quite a few projects are maintaining local copies of the X
region code. Obviously cairo and the X server are two, but I think GDK
is another, and I suspect there are more. I'd hope we could get the many
implementations unified.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20061115/0190c2c2/attachment.pgp


More information about the Xcb mailing list