[cairo] More on the future of cairo's X11 backends

Bryce Harrington bryce at osg.samsung.com
Fri Jan 27 17:56:52 UTC 2017

On Fri, Jan 27, 2017 at 10:51:31AM +0100, Uli Schlachter wrote:
> On 27.01.2017 02:55, Bryce Harrington wrote:
> > On Wed, Jan 25, 2017 at 12:02:47PM +0100, Uli Schlachter wrote:
> [...]
> >> - Introduce these function pointers in cairo-xlib and make use of them
> >> - Add an xcb-xlib-backend that implements the xcb API ontop of these
> >> function pointers
> >> - Eventually remove the current cairo-xcb and cairo-xlib-xcb code and
> >> only leave the above.
> >>
> >> Of course this is all still a bit rough around the edges, but what do
> >> you think?
> > 
> > So do I understand this would (temporarily) add a third backend, that
> > implements this strategy,
> [...]
> A bit, yeah. So:
> Current cairo-xlib gets lots of changes so that it does not use Xlib
> directly, but a thin wrapper around it. The idea being that this can be
> done with lots of almost-trivial patches, nothing complicated.

My reviewer ears are liking the sound of almost-trivial uncomplicated

> Afterwards this thin wrapper can also be implemented with XCB to produce
> a new cairo-x11-xcb-something backend.
> At this point I would want to compare test and performance results
> between "new cairo-xcb" and "old cairo-xcb".

Good approach.  And I would think even a slight loss in performance, say
1%, would still be acceptable for the benefit of gaining a unified
codebase.  But ideally the performance difference should be 0%, right?

> At any point now we could drop the current xcb backend ("old
> cairo-xcb") without much impact (well, configure would need to be
> fixed up).

Would the new and old xcb backends be providing the same user visble
API, so that there are no compatibility concerns?

> Yes, long term this should give us just a single X11 backend and a thin
> abstraction layer around X11.

Sounds good.  +1 from me for proceeding on this.


More information about the cairo mailing list