[cairo] Image-Data upload using SHM

Clemens Eisserer linuxhippy at gmail.com
Thu Oct 20 02:53:18 PDT 2011

Hi Chris

> At the moment the most mature use of XSHM is exposed through cairo-xcb.
> The catch is that to avoid the copy, you need to decode the pixel data
> into the ShmSegment which needs application support and the use of
> cairo_surface_create_similar_image() or even
> cairo_surface_map_to_image().

Thanks for the pointer, I'll have a look at it.

> Why is xcb not using a BigReq anyway?

As far as I know, xcb does use BigReq.
I am not an expert at such a low-level, but from my understanding xcb
allocates a fixed-size 16kb buffer,
and when writing more data than those 16kb, it has to flush the
output-buffer - so the x-server can consume the data.
At least that would explain the 25k context switches per second I am

Thanks, Clemens

More information about the cairo mailing list