[cairo] Interested in XCB (but not GSoC)
cworth at cworth.org
Wed Apr 9 09:30:47 PDT 2008
On Wed, 09 Apr 2008 10:44:30 -0500, Behdad Esfahbod wrote:
> what's currently in cairo-xlib-surface.c) in cairo-x11-operations.c.
> Something like that...
Actually, we can even go a step further here.
With PDF and PostScript we're targeting two separate document formats,
(and luckily PostScript is very general-purpose so we were able to
encode compatibility within the output we generate).
But with Xlib and XCB the compatibility is much more in place already,
because recent versions of Xlib already depend on XCB and that support
was written with the explicit concept of allowing applications to
reach down into XCB as desired.
> We do need to embrace xcb's more flexible error handling though. That's
> one of the major benefits of xcb over xlib.
So here's how I think things should happen:
1. We first write a "complete" cairo-xcb-surface.c, (pulling in all
features from cairo-xlib that are currently missing in cairo-xcb).
2. We then make that implementation "ideal" as well, (taking advantage
of XCB error-handling, etc.).
3. We write a new cairo-xlib-surface.c that's simply a tiny wrapper,
(extracting the necessary XCB data out of the Xlib objects that the
application hands us). This "thin wrapper" approach will only work
with "recent" Xlib, (and something to investigate is exactly how
recent that requirement actually is).
4. We write a compatibility layer in cairo-xlib-surface.c to allow it
to use the cairo-xcb-surface.c implementation even on old,
non-XCB-based versions of Xlib. So these compatibility layers would
have all of the inefficiencies in them, but they would also never
be used on any modern system.
This approach gives applications as many XCB benefits as possible
without them having to recode from cairo-xlib to cairo-xcb.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080409/49e98ba6/attachment.pgp
More information about the cairo