diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-17 21:33:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-17 23:43:26 +0100 |
commit | c068691ff57c2f6cd750a54db17393c0e132cb00 (patch) | |
tree | 572c6165864275dc7b1a0d002a80dd88899ef8e9 /src/cairo-xlib-surface.c | |
parent | bc38108947a684fb6e7af99a48ebc8f79d05856a (diff) | |
download | cairo-c068691ff57c2f6cd750a54db17393c0e132cb00.tar.gz |
xlib/shm: Use an impromptu upload ShmSegment
Reduce the number of copies required for uploading large image data.
Ultimately we want the client to allocate the similar-image itself to
acheive zero copy, this is just an intermediate step for legacy clients.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-xlib-surface.c')
-rw-r--r-- | src/cairo-xlib-surface.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index ff4117cbf..6127e076c 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -762,8 +762,8 @@ _get_image_surface (cairo_xlib_surface_t *surface, pixman_format = _pixman_format_for_xlib_surface (surface); if (try_shm && pixman_format) { image = (cairo_image_surface_t *) - _cairo_xlib_surface_create_shm_image (surface, pixman_format, - extents->width, extents->height); + _cairo_xlib_surface_create_shm__image (surface, pixman_format, + extents->width, extents->height); if (image && image->base.status == CAIRO_STATUS_SUCCESS) { cairo_xlib_error_func_t old_handler; XImage shm_image; @@ -1104,7 +1104,6 @@ _cairo_xlib_surface_draw_image (cairo_xlib_surface_t *surface, ximage.bits_per_pixel = image_masks.bpp; ximage.bytes_per_line = image->stride; ximage.data = (char *)image->data; - ximage.obdata = NULL; if (image->base.device == surface->base.device) ximage.obdata = _cairo_xlib_shm_surface_get_obdata (&image->base); own_data = FALSE; |