[Xcb] Cairo XCB backend

Jamey Sharp jamey@minilop.net
Mon, 2 Feb 2004 23:26:05 -0800


--yUmmepPgoWmUqRhm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Cairo can use XCB as a backend in place of Xlib now, meaning we have a
new class of potential test apps for XCB. I've committed changes to
cairo, xcb-proto, and cairo-demo.

Last week I cornered Keith and made him explain some oddities of Render
to me, then brought XCB's client-side implementation of Render up to
date with the current protocol, and finally ported Cairo's Xlib surface
backend and one of the demos to XCB.

Cairo's XCB backend can't currently be compiled alongside the Xlib
backend, because both libraries define some of the same symbols. (I'd
really appreciate people's thoughts on making the libraries co-exist
better.) Meanwhile, I set Cairo's configure script to default to not
building the XCB backend.

I expect the Cairo XCB port is broken various ways; in particular, I
noticed that cairo-demo renders the rotated text as garbage on my
system. I imagine the fact that my GetImage and PutImage calls are way
over-simplistic is the cause. So some testing and inspection by people
who understand the X protocol better than I do would be appreciated.
(Writing XCB has almost never required me to know the semantics of X...)

To build Cairo with XCB:

 * Get/build/install xproto, then xau, from CVS root
   freedesktop.org:/cvs/xlibs
 * Get/build/install xcb-proto, then xcb, from CVS root
   freedesktop.org:/cvs/xcb
 * Install the usual Cairo prerequisites (see http://cairographics.org).
 * Configure Cairo with the '--disable-xlib --enable-xcb' options.

cairo-demo/X11/cairo-demo.c is the only demo I modified to be able to
use the new backend; the others won't compile with an XCB-only Cairo
until they're suitably modified too.

I so hope to get some good feedback on XCB from this...
--=20
Jamey Sharp <jamey@minilop.net> - http://minilop.net/

--yUmmepPgoWmUqRhm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAH00NNgAXSpyH6VcRApwOAJwLG8FEa58BKsKoH/0n80gCAQTuCQCaA0AC
Y39o8v3SM7/0Tf6gFfPO/PY=
=9Pa8
-----END PGP SIGNATURE-----

--yUmmepPgoWmUqRhm--