mirror of
https://github.com/brl/mutter.git
synced 2025-08-04 15:45:54 +00:00
bitmap: Add a function to convert into an existing buffer
This adds _cogl_bitmap_convert_into_bitmap which is the same as _cogl_bitmap_convert except that it writes into an existing bitmap instead of allocating a new one. _cogl_bitmap_convert now just allocates a buffer and calls the new function. This is used in _cogl_read_pixels to avoid allocating a second intermediate buffer when the pixel format to store in is not GL_RGBA. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
@@ -87,6 +87,10 @@ CoglBitmap *
|
||||
_cogl_bitmap_convert (CoglBitmap *bmp,
|
||||
CoglPixelFormat dst_format);
|
||||
|
||||
gboolean
|
||||
_cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
||||
CoglBitmap *dst_bmp);
|
||||
|
||||
CoglBitmap *
|
||||
_cogl_bitmap_from_file (const char *filename,
|
||||
GError **error);
|
||||
@@ -101,7 +105,7 @@ gboolean
|
||||
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
|
||||
CoglPixelFormat dst_format);
|
||||
|
||||
void
|
||||
gboolean
|
||||
_cogl_bitmap_copy_subregion (CoglBitmap *src,
|
||||
CoglBitmap *dst,
|
||||
int src_x,
|
||||
|
Reference in New Issue
Block a user