[Xcb] [cairo] Whatever happened to the XCloseDisplay() hooks?

Carl Worth cworth at cworth.org
Thu Oct 15 11:48:18 PDT 2009

Excerpts from Jamey Sharp's message of Wed Oct 14 12:17:19 -0700 2009:
> I'd argue in a different direction: higher layers should manage
> caches. The cairo XCB surface constructors could take a
> cairo-xcb-connection object instead of the xcb_connection_t. That
> object would be constructed from an xcb_connection_t and contain any
> caches you want. The caller can decide when to allocate and free that
> association.
> What nightmare arises if you take that approach?

Extra objects that the user has to juggle. That's what I want to avoid
in cairo.

The way things work in all current supported cairo surfaces is that
the user talks to the native backend API, (Xlib, Quartz, etc.), to
create a native "surface" and then calls a cairo-backend specific API
to create a cairo_surface_t from that.

Your proposals calls for the user of cairo-xcb to have an additional
cairo-wrapped object that the user must manage with its own lifetime
constraints, etc.

To me, that just makes cairo-xcb harder to use than any other cairo
backend. So I'd much prefer that any additional object necessary here
be created and managed by cairo itself, entirely transparent to the

And so far, the callback approach is the only means I've seen proposed
for that.


PS. For what it's worth: I fought hard the first time callbacks were
proposed for cairo too. I finally relented and the callbacks have
really worked out just fine so far.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20091015/3b0fee0b/attachment.pgp 

More information about the Xcb mailing list