summaryrefslogtreecommitdiff
path: root/cogl/cogl-bitmap-private.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2010-01-29 15:15:08 +0000
committerNeil Roberts <neil@linux.intel.com>2010-02-01 13:27:34 +0000
commita6f061e41fa97267c35e15869ba91d21de2ad1f2 (patch)
tree356a699ea647384b228f22f4bcabdae930166352 /cogl/cogl-bitmap-private.h
parent406c203b422bd492235ffa91816671f4fd26e44c (diff)
downloadcogl-a6f061e41fa97267c35e15869ba91d21de2ad1f2.tar.gz
cogl: Do the premult conversion in-place rather than copying to a new buffer
The premult part of _cogl_convert_premult has now been split out as _cogl_convert_premult_status. _cogl_convert_premult has been renamed to _cogl_convert_format to make it less confusing. The premult conversion is now done in-place instead of copying the buffer. Previously it was copying the buffer once for the format conversion and then copying it again for the premult conversion. The premult conversion never changes the size of the buffer so it's quite easy to do in place. We can also use the separated out function independently.
Diffstat (limited to 'cogl/cogl-bitmap-private.h')
-rw-r--r--cogl/cogl-bitmap-private.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/cogl/cogl-bitmap-private.h b/cogl/cogl-bitmap-private.h
index b6e42573..803e10bb 100644
--- a/cogl/cogl-bitmap-private.h
+++ b/cogl/cogl-bitmap-private.h
@@ -68,20 +68,16 @@ _cogl_bitmap_fallback_convert (const CoglBitmap *bmp,
CoglPixelFormat dst_format);
gboolean
-_cogl_bitmap_unpremult (const CoglBitmap *bmp,
- CoglBitmap *dst_bmp);
+_cogl_bitmap_unpremult (CoglBitmap *dst_bmp);
gboolean
-_cogl_bitmap_fallback_unpremult (const CoglBitmap *bmp,
- CoglBitmap *dst_bmp);
+_cogl_bitmap_fallback_unpremult (CoglBitmap *dst_bmp);
gboolean
-_cogl_bitmap_premult (const CoglBitmap *bmp,
- CoglBitmap *dst_bmp);
+_cogl_bitmap_premult (CoglBitmap *dst_bmp);
gboolean
-_cogl_bitmap_fallback_premult (const CoglBitmap *bmp,
- CoglBitmap *dst_bmp);
+_cogl_bitmap_fallback_premult (CoglBitmap *dst_bmp);
gboolean
_cogl_bitmap_from_file (CoglBitmap *bmp,
@@ -93,9 +89,13 @@ _cogl_bitmap_fallback_from_file (CoglBitmap *bmp,
const gchar *filename);
gboolean
-_cogl_bitmap_convert_and_premult (const CoglBitmap *bmp,
- CoglBitmap *dst_bmp,
- CoglPixelFormat dst_format);
+_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
+ CoglPixelFormat dst_format);
+
+gboolean
+_cogl_bitmap_convert_format_and_premult (const CoglBitmap *bmp,
+ CoglBitmap *dst_bmp,
+ CoglPixelFormat dst_format);
void
_cogl_bitmap_copy_subregion (CoglBitmap *src,