[cairo] The future of cairo's X11 backends

Chris Wilson chris at chris-wilson.co.uk
Mon Sep 30 02:40:12 PDT 2013


On Mon, Sep 30, 2013 at 11:36:08AM +0200, Uli Schlachter wrote:
> On 29.09.2013 14:02, Chris Wilson wrote:
> >> My plan would be to make cairo-xlib use xcb and XGetXCBConnection() for
> >> everything, dump cairo-xcb and re-implement the cairo-xcb API on top of the code
> >> that is left. This can easily be done incrementally. Basically it is "dump
> >> cairo-xcb and turn cairo-xlib into a new cairo-xcb". I guess this means that the
> >> now-common source files and functions need to be renamed to cairo-x11-*.c and
> >> cairo_x11_*. :-)
> > 
> > That seems reasonable, but realistically what advantages does doing the
> > x11-to-xcb conversion in cairo-xlib give that doing it in libX11 itself
> > misses? I suppose marrying the cairo-device and the Display lock would
> > be improved. We would have to reinvent the XCloseDisplay hooks.
> 
> I am not sure I understand. Do you mean "xlib already talks to xcb for us, why
> would we want to talk to xcb directly"?

Yes, I wondering what the merits are of moving that translation one library
higher.

> The reason for that would be: cairo-xcb exists and (hopefully) doesn't go away.
> Thus cairo has to be able to work with just an xcb_connection_t* instead of a
> Display*. It does so already, but this was done via copying the backend which
> seems wasteful.

Ok, that seems a reasonable argument:

We can support native xcb and native xlib applications using cairo-xcb,
but we cannot support native xcb applications using cairo-xlib.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list