diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-22 00:36:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-07-26 14:55:58 +0100 |
commit | a69335a84eb9225b477cc8c753470eb3805b852c (patch) | |
tree | 7a28492ebf390e513391af587f00c017e4ca6301 /src/cairo-recording-surface.c | |
parent | c6812c6a3679c3b8b9584e119e0d7fd93e09ae49 (diff) |
API: map-to-image and create-similar-image
A common requirement is the fast upload of pixel data. In order to
allocate the most appropriate image buffer, we need knowledge of the
destination. The most obvious example is that we could use a
shared-memory region for the image to avoid the transfer cost of
uploading the pixels to the X server. Similarly, gl, win32, quartz...
The other side of the equation is that for manual modification of a
remote surface, it would be more efficient if we can create a similar
image to reduce the transfer costs. This strategy is already followed
for the destination fallbacks and this merely exposes the same
capability for the application fallbacks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-recording-surface.c')
-rw-r--r-- | src/cairo-recording-surface.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c index 16cc5c146..1ce3e22a9 100644 --- a/src/cairo-recording-surface.c +++ b/src/cairo-recording-surface.c @@ -805,10 +805,15 @@ _cairo_surface_is_recording (const cairo_surface_t *surface) static const cairo_surface_backend_t cairo_recording_surface_backend = { CAIRO_SURFACE_TYPE_RECORDING, + _cairo_recording_surface_finish, + _cairo_default_context_create, _cairo_recording_surface_create_similar, - _cairo_recording_surface_finish, + NULL, /* create similar image */ + NULL, /* map to image */ + NULL, /* unmap image */ + _cairo_recording_surface_acquire_source_image, _cairo_recording_surface_release_source_image, NULL, /* acquire_dest_image */ |