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-error-private.h | |
parent | c6812c6a3679c3b8b9584e119e0d7fd93e09ae49 (diff) | |
download | cairo-a69335a84eb9225b477cc8c753470eb3805b852c.tar.gz |
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-error-private.h')
-rw-r--r-- | src/cairo-error-private.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cairo-error-private.h b/src/cairo-error-private.h index 953e8afaf..5f517d40c 100644 --- a/src/cairo-error-private.h +++ b/src/cairo-error-private.h @@ -41,6 +41,8 @@ #include "cairo.h" #include "cairo-compiler-private.h" +#include <assert.h> + CAIRO_BEGIN_DECLS enum _cairo_int_status { @@ -100,6 +102,13 @@ enum _cairo_int_status { #define _cairo_int_status_is_error(status) \ (status != CAIRO_INT_STATUS_SUCCESS && status <= CAIRO_INT_STATUS_LAST_STATUS) +static inline cairo_status_t +_cairo_public_status (cairo_int_status_t status) +{ + assert (status <= CAIRO_INT_STATUS_LAST_STATUS); + return status; +} + cairo_private cairo_status_t _cairo_error (cairo_status_t status); |