diff options
author | Neil Roberts <neil@linux.intel.com> | 2012-02-25 20:28:50 +0000 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2012-03-05 19:02:29 +0000 |
commit | 76c2bd8420a7e1db2a6a6fa61b7c24dc44ad3684 (patch) | |
tree | 8b8da11addf94b48d6e03997511c520f8ca365c0 /cogl/cogl-bitmap.h | |
parent | 71145888847fd47e74d56c48f41337badc8121e2 (diff) | |
download | cogl-76c2bd8420a7e1db2a6a6fa61b7c24dc44ad3684.tar.gz |
cogl-bitmap: Add a public accessor for the underlying pixel buffer
This adds a small cogl_bitmap_get_buffer public function. Note that
this can return NULL if the bitmap was not created with a pixel
buffer. It might be nice to change this eventually so that all bitmaps
have a pixel buffer.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'cogl/cogl-bitmap.h')
-rw-r--r-- | cogl/cogl-bitmap.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cogl/cogl-bitmap.h b/cogl/cogl-bitmap.h index 934715ce..3787d921 100644 --- a/cogl/cogl-bitmap.h +++ b/cogl/cogl-bitmap.h @@ -31,6 +31,7 @@ #include <cogl/cogl-types.h> #include <cogl/cogl-buffer.h> #include <cogl/cogl-context.h> +#include <cogl/cogl-pixel-buffer.h> G_BEGIN_DECLS @@ -174,6 +175,20 @@ cogl_bitmap_get_height (CoglBitmap *bitmap); int cogl_bitmap_get_rowstride (CoglBitmap *bitmap); +/** + * cogl_bitmap_get_buffer: + * @bitmap: A #CoglBitmap + * + * Return value: the #CoglPixelBuffer that this buffer uses for + * storage. Note that if the bitmap was created with + * cogl_bitmap_new_from_file() then it will not actually be using a + * pixel buffer and this function will return %NULL. + * Stability: unstable + * Since: 1.10 + */ +CoglPixelBuffer * +cogl_bitmap_get_buffer (CoglBitmap *bitmap); + #endif /* COGL_ENABLE_EXPERIMENTAL_API */ /** |