summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-01-18 18:14:42 +0000
committerNeil Roberts <neil@linux.intel.com>2013-01-21 15:07:05 +0000
commitc8081d7f2824ad8fad8357c2144ff764274a6946 (patch)
treea3974393da9e9cfe7a26071bd48e530618cce465
parent5bce5f88d948dc675fbe6c9a5201e4613996c743 (diff)
downloadcogl-c8081d7f2824ad8fad8357c2144ff764274a6946.tar.gz
bitmap: Don't try to token paste the typenames from stdint.h
Previously the functions for packing and unpacking pixels where generated by token pasting together a function name along with its type, like the following: _cogl_pack_ ## uint8_t Then later in cogl-bitmap-conversion.c it would directly refer to the function names without token pasting. This wouldn't work however if the system headers define the stdint types using #defines instead of typedefs because in that case the function name generated using token pasting would get the expanded type name but the reference that doesn't use token pasting wouldn't. This patch adds an extra macro passed to the cogl-bitmap-packing.h header which just has the type size. That way the function can be defined like this instead: _cogl_pack_ ## 8 That should prevent it from hitting problems with #defined types. https://bugzilla.gnome.org/show_bug.cgi?id=691945 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit d6b5d7085b004ebd48c1543b820331802395ee63)
-rw-r--r--cogl/cogl-bitmap-conversion.c52
-rw-r--r--cogl/cogl-bitmap-packing.h124
2 files changed, 90 insertions, 86 deletions
diff --git a/cogl/cogl-bitmap-conversion.c b/cogl/cogl-bitmap-conversion.c
index 17b26e6f..355d5fa3 100644
--- a/cogl/cogl-bitmap-conversion.c
+++ b/cogl/cogl-bitmap-conversion.c
@@ -32,6 +32,7 @@
#include <string.h>
#define component_type uint8_t
+#define component_size 8
/* We want to specially optimise the packing when we are converting
to/from an 8-bit type so that it won't do anything. That way for
example if we are just doing a swizzle conversion then the inner
@@ -42,14 +43,17 @@
#undef PACK_BYTE
#undef UNPACK_BYTE
#undef component_type
+#undef component_size
#define component_type uint16_t
+#define component_size 16
#define UNPACK_BYTE(b) (((b) * 65535 + 127) / 255)
#define PACK_BYTE(b) (((b) * 255 + 32767) / 65535)
#include "cogl-bitmap-packing.h"
#undef PACK_BYTE
#undef UNPACK_BYTE
#undef component_type
+#undef component_size
/* (Un)Premultiplication */
@@ -205,8 +209,8 @@ _cogl_premult_alpha_last_four_pixels_sse2 (uint8_t *p)
#endif /* COGL_USE_PREMULT_SSE2 */
static void
-_cogl_bitmap_premult_unpacked_span_uint8_t (uint8_t *data,
- int width)
+_cogl_bitmap_premult_unpacked_span_8 (uint8_t *data,
+ int width)
{
#ifdef COGL_USE_PREMULT_SSE2
@@ -231,8 +235,8 @@ _cogl_bitmap_premult_unpacked_span_uint8_t (uint8_t *data,
}
static void
-_cogl_bitmap_unpremult_unpacked_span_uint8_t (uint8_t *data,
- int width)
+_cogl_bitmap_unpremult_unpacked_span_8 (uint8_t *data,
+ int width)
{
int x;
@@ -247,8 +251,8 @@ _cogl_bitmap_unpremult_unpacked_span_uint8_t (uint8_t *data,
}
static void
-_cogl_bitmap_unpremult_unpacked_span_uint16_t (uint16_t *data,
- int width)
+_cogl_bitmap_unpremult_unpacked_span_16 (uint16_t *data,
+ int width)
{
while (width-- > 0)
{
@@ -266,8 +270,8 @@ _cogl_bitmap_unpremult_unpacked_span_uint16_t (uint16_t *data,
}
static void
-_cogl_bitmap_premult_unpacked_span_uint16_t (uint16_t *data,
- int width)
+_cogl_bitmap_premult_unpacked_span_16 (uint16_t *data,
+ int width)
{
while (width-- > 0)
{
@@ -430,9 +434,9 @@ _cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
dst = dst_data + y * dst_rowstride;
if (use_16)
- _cogl_unpack_uint16_t (src_format, src, tmp_row, width);
+ _cogl_unpack_16 (src_format, src, tmp_row, width);
else
- _cogl_unpack_uint8_t (src_format, src, tmp_row, width);
+ _cogl_unpack_8 (src_format, src, tmp_row, width);
/* Handle premultiplication */
if (need_premult)
@@ -440,23 +444,23 @@ _cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
if (dst_format & COGL_PREMULT_BIT)
{
if (use_16)
- _cogl_bitmap_premult_unpacked_span_uint16_t (tmp_row, width);
+ _cogl_bitmap_premult_unpacked_span_16 (tmp_row, width);
else
- _cogl_bitmap_premult_unpacked_span_uint8_t (tmp_row, width);
+ _cogl_bitmap_premult_unpacked_span_8 (tmp_row, width);
}
else
{
if (use_16)
- _cogl_bitmap_unpremult_unpacked_span_uint16_t (tmp_row, width);
+ _cogl_bitmap_unpremult_unpacked_span_16 (tmp_row, width);
else
- _cogl_bitmap_unpremult_unpacked_span_uint8_t (tmp_row, width);
+ _cogl_bitmap_unpremult_unpacked_span_8 (tmp_row, width);
}
}
if (use_16)
- _cogl_pack_uint16_t (dst_format, tmp_row, dst, width);
+ _cogl_pack_16 (dst_format, tmp_row, dst, width);
else
- _cogl_pack_uint8_t (dst_format, tmp_row, dst, width);
+ _cogl_pack_8 (dst_format, tmp_row, dst, width);
}
_cogl_bitmap_unmap (src_bmp);
@@ -527,9 +531,9 @@ _cogl_bitmap_unpremult (CoglBitmap *bmp)
if (tmp_row)
{
- _cogl_unpack_uint16_t (format, p, tmp_row, width);
- _cogl_bitmap_unpremult_unpacked_span_uint16_t (tmp_row, width);
- _cogl_pack_uint16_t (format, tmp_row, p, width);
+ _cogl_unpack_16 (format, p, tmp_row, width);
+ _cogl_bitmap_unpremult_unpacked_span_16 (tmp_row, width);
+ _cogl_pack_16 (format, tmp_row, p, width);
}
else
{
@@ -545,7 +549,7 @@ _cogl_bitmap_unpremult (CoglBitmap *bmp)
}
}
else
- _cogl_bitmap_unpremult_unpacked_span_uint8_t (p, width);
+ _cogl_bitmap_unpremult_unpacked_span_8 (p, width);
}
}
@@ -592,9 +596,9 @@ _cogl_bitmap_premult (CoglBitmap *bmp)
if (tmp_row)
{
- _cogl_unpack_uint16_t (format, p, tmp_row, width);
- _cogl_bitmap_premult_unpacked_span_uint16_t (tmp_row, width);
- _cogl_pack_uint16_t (format, tmp_row, p, width);
+ _cogl_unpack_16 (format, p, tmp_row, width);
+ _cogl_bitmap_premult_unpacked_span_16 (tmp_row, width);
+ _cogl_pack_16 (format, tmp_row, p, width);
}
else
{
@@ -607,7 +611,7 @@ _cogl_bitmap_premult (CoglBitmap *bmp)
}
}
else
- _cogl_bitmap_premult_unpacked_span_uint8_t (p, width);
+ _cogl_bitmap_premult_unpacked_span_8 (p, width);
}
}
diff --git a/cogl/cogl-bitmap-packing.h b/cogl/cogl-bitmap-packing.h
index f84af028..8cea76d4 100644
--- a/cogl/cogl-bitmap-packing.h
+++ b/cogl/cogl-bitmap-packing.h
@@ -42,7 +42,7 @@
511) / 1023)
inline static void
-G_PASTE (_cogl_unpack_a_8_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_a_8_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -58,7 +58,7 @@ G_PASTE (_cogl_unpack_a_8_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_g_8_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_g_8_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -79,7 +79,7 @@ G_PASTE (_cogl_unpack_g_8_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_rgb_888_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_rgb_888_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -95,7 +95,7 @@ G_PASTE (_cogl_unpack_rgb_888_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_bgr_888_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_bgr_888_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -111,7 +111,7 @@ G_PASTE (_cogl_unpack_bgr_888_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_bgra_8888_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_bgra_8888_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -127,7 +127,7 @@ G_PASTE (_cogl_unpack_bgra_8888_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_argb_8888_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_argb_8888_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -143,7 +143,7 @@ G_PASTE (_cogl_unpack_argb_8888_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_abgr_8888_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_abgr_8888_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -159,7 +159,7 @@ G_PASTE (_cogl_unpack_abgr_8888_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_rgba_8888_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_rgba_8888_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -175,7 +175,7 @@ G_PASTE (_cogl_unpack_rgba_8888_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_rgb_565_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_rgb_565_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -193,7 +193,7 @@ G_PASTE (_cogl_unpack_rgb_565_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_rgba_4444_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_rgba_4444_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -211,7 +211,7 @@ G_PASTE (_cogl_unpack_rgba_4444_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_rgba_5551_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_rgba_5551_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -229,7 +229,7 @@ G_PASTE (_cogl_unpack_rgba_5551_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_rgba_1010102_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_rgba_1010102_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -247,7 +247,7 @@ G_PASTE (_cogl_unpack_rgba_1010102_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_bgra_1010102_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_bgra_1010102_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -265,7 +265,7 @@ G_PASTE (_cogl_unpack_bgra_1010102_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_argb_2101010_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_argb_2101010_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -283,7 +283,7 @@ G_PASTE (_cogl_unpack_argb_2101010_, component_type) (const uint8_t *src,
}
inline static void
-G_PASTE (_cogl_unpack_abgr_2101010_, component_type) (const uint8_t *src,
+G_PASTE (_cogl_unpack_abgr_2101010_, component_size) (const uint8_t *src,
component_type *dst,
int width)
{
@@ -308,7 +308,7 @@ G_PASTE (_cogl_unpack_abgr_2101010_, component_type) (const uint8_t *src,
#undef UNPACK_10
inline static void
-G_PASTE (_cogl_unpack_, component_type) (CoglPixelFormat format,
+G_PASTE (_cogl_unpack_, component_size) (CoglPixelFormat format,
const uint8_t *src,
component_type *dst,
int width)
@@ -316,59 +316,59 @@ G_PASTE (_cogl_unpack_, component_type) (CoglPixelFormat format,
switch (format)
{
case COGL_PIXEL_FORMAT_A_8:
- G_PASTE (_cogl_unpack_a_8_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_a_8_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_G_8:
- G_PASTE (_cogl_unpack_g_8_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_g_8_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGB_888:
- G_PASTE (_cogl_unpack_rgb_888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_rgb_888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_BGR_888:
- G_PASTE (_cogl_unpack_bgr_888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_bgr_888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_8888:
case COGL_PIXEL_FORMAT_RGBA_8888_PRE:
- G_PASTE (_cogl_unpack_rgba_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_rgba_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_BGRA_8888:
case COGL_PIXEL_FORMAT_BGRA_8888_PRE:
- G_PASTE (_cogl_unpack_bgra_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_bgra_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ARGB_8888:
case COGL_PIXEL_FORMAT_ARGB_8888_PRE:
- G_PASTE (_cogl_unpack_argb_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_argb_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ABGR_8888:
case COGL_PIXEL_FORMAT_ABGR_8888_PRE:
- G_PASTE (_cogl_unpack_abgr_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_abgr_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGB_565:
- G_PASTE (_cogl_unpack_rgb_565_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_rgb_565_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_4444:
case COGL_PIXEL_FORMAT_RGBA_4444_PRE:
- G_PASTE (_cogl_unpack_rgba_4444_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_rgba_4444_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_5551:
case COGL_PIXEL_FORMAT_RGBA_5551_PRE:
- G_PASTE (_cogl_unpack_rgba_5551_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_rgba_5551_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_1010102:
case COGL_PIXEL_FORMAT_RGBA_1010102_PRE:
- G_PASTE (_cogl_unpack_rgba_1010102_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_rgba_1010102_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_BGRA_1010102:
case COGL_PIXEL_FORMAT_BGRA_1010102_PRE:
- G_PASTE (_cogl_unpack_bgra_1010102_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_bgra_1010102_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ARGB_2101010:
case COGL_PIXEL_FORMAT_ARGB_2101010_PRE:
- G_PASTE (_cogl_unpack_argb_2101010_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_argb_2101010_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ABGR_2101010:
case COGL_PIXEL_FORMAT_ABGR_2101010_PRE:
- G_PASTE (_cogl_unpack_abgr_2101010_, component_type) (src, dst, width);
+ G_PASTE (_cogl_unpack_abgr_2101010_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ANY:
case COGL_PIXEL_FORMAT_YUV:
@@ -391,7 +391,7 @@ G_PASTE (_cogl_unpack_, component_type) (CoglPixelFormat format,
#define PACK_10(b) PACK_SIZE (b, 1023)
inline static void
-G_PASTE (_cogl_pack_a_8_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_a_8_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -404,7 +404,7 @@ G_PASTE (_cogl_pack_a_8_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_g_8_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_g_8_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -422,7 +422,7 @@ G_PASTE (_cogl_pack_g_8_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_rgb_888_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_rgb_888_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -437,7 +437,7 @@ G_PASTE (_cogl_pack_rgb_888_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_bgr_888_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_bgr_888_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -452,7 +452,7 @@ G_PASTE (_cogl_pack_bgr_888_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_bgra_8888_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_bgra_8888_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -468,7 +468,7 @@ G_PASTE (_cogl_pack_bgra_8888_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_argb_8888_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_argb_8888_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -484,7 +484,7 @@ G_PASTE (_cogl_pack_argb_8888_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_abgr_8888_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_abgr_8888_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -500,7 +500,7 @@ G_PASTE (_cogl_pack_abgr_8888_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_rgba_8888_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_rgba_8888_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -516,7 +516,7 @@ G_PASTE (_cogl_pack_rgba_8888_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_rgb_565_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_rgb_565_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -533,7 +533,7 @@ G_PASTE (_cogl_pack_rgb_565_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_rgba_4444_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_rgba_4444_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -551,7 +551,7 @@ G_PASTE (_cogl_pack_rgba_4444_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_rgba_5551_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_rgba_5551_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -569,7 +569,7 @@ G_PASTE (_cogl_pack_rgba_5551_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_rgba_1010102_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_rgba_1010102_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -587,7 +587,7 @@ G_PASTE (_cogl_pack_rgba_1010102_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_bgra_1010102_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_bgra_1010102_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -605,7 +605,7 @@ G_PASTE (_cogl_pack_bgra_1010102_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_argb_2101010_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_argb_2101010_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -623,7 +623,7 @@ G_PASTE (_cogl_pack_argb_2101010_, component_type) (const component_type *src,
}
inline static void
-G_PASTE (_cogl_pack_abgr_2101010_, component_type) (const component_type *src,
+G_PASTE (_cogl_pack_abgr_2101010_, component_size) (const component_type *src,
uint8_t *dst,
int width)
{
@@ -649,7 +649,7 @@ G_PASTE (_cogl_pack_abgr_2101010_, component_type) (const component_type *src,
#undef PACK_10
inline static void
-G_PASTE (_cogl_pack_, component_type) (CoglPixelFormat format,
+G_PASTE (_cogl_pack_, component_size) (CoglPixelFormat format,
const component_type *src,
uint8_t *dst,
int width)
@@ -657,59 +657,59 @@ G_PASTE (_cogl_pack_, component_type) (CoglPixelFormat format,
switch (format)
{
case COGL_PIXEL_FORMAT_A_8:
- G_PASTE (_cogl_pack_a_8_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_a_8_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_G_8:
- G_PASTE (_cogl_pack_g_8_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_g_8_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGB_888:
- G_PASTE (_cogl_pack_rgb_888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_rgb_888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_BGR_888:
- G_PASTE (_cogl_pack_bgr_888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_bgr_888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_8888:
case COGL_PIXEL_FORMAT_RGBA_8888_PRE:
- G_PASTE (_cogl_pack_rgba_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_rgba_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_BGRA_8888:
case COGL_PIXEL_FORMAT_BGRA_8888_PRE:
- G_PASTE (_cogl_pack_bgra_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_bgra_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ARGB_8888:
case COGL_PIXEL_FORMAT_ARGB_8888_PRE:
- G_PASTE (_cogl_pack_argb_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_argb_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ABGR_8888:
case COGL_PIXEL_FORMAT_ABGR_8888_PRE:
- G_PASTE (_cogl_pack_abgr_8888_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_abgr_8888_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGB_565:
- G_PASTE (_cogl_pack_rgb_565_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_rgb_565_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_4444:
case COGL_PIXEL_FORMAT_RGBA_4444_PRE:
- G_PASTE (_cogl_pack_rgba_4444_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_rgba_4444_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_5551:
case COGL_PIXEL_FORMAT_RGBA_5551_PRE:
- G_PASTE (_cogl_pack_rgba_5551_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_rgba_5551_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_RGBA_1010102:
case COGL_PIXEL_FORMAT_RGBA_1010102_PRE:
- G_PASTE (_cogl_pack_rgba_1010102_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_rgba_1010102_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_BGRA_1010102:
case COGL_PIXEL_FORMAT_BGRA_1010102_PRE:
- G_PASTE (_cogl_pack_bgra_1010102_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_bgra_1010102_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ARGB_2101010:
case COGL_PIXEL_FORMAT_ARGB_2101010_PRE:
- G_PASTE (_cogl_pack_argb_2101010_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_argb_2101010_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ABGR_2101010:
case COGL_PIXEL_FORMAT_ABGR_2101010_PRE:
- G_PASTE (_cogl_pack_abgr_2101010_, component_type) (src, dst, width);
+ G_PASTE (_cogl_pack_abgr_2101010_, component_size) (src, dst, width);
break;
case COGL_PIXEL_FORMAT_ANY:
case COGL_PIXEL_FORMAT_YUV: