[cairo] Image-Data upload using SHM

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 20 02:46:09 PDT 2011

On Thu, 20 Oct 2011 11:08:35 +0200, Clemens Eisserer <linuxhippy at gmail.com> wrote:
> Hi,
> I did some profiling of Firefox's html5 video element which uses
> cairo, and the low performance I observed seems to be caused by not
> using XShmPutImage for uploading video-data.
> Instead, XPutImage is used - with xcb's 16kb buffer this results in
> about ~25k cs/s, slowing my machine down to a crawl.
> Does cairo support using the XSHM extensions, or are there patches available?

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(). Why is xcb not using a BigReq anyway?

Chris Wilson, Intel Open Source Technology Centre

More information about the cairo mailing list