[test-cogl-tex-getset] Assume a premultiplied pixel format

test-cogl-tex-getset was assuming it was dealing with
COGL_PIXEL_FORMAT_RGBA_8888 but since merging the premultiplcation branch
the pixel format is actually COGL_PIXEL_FORMAT_RGBA_8888_PRE
This commit is contained in:
Robert Bragg 2009-06-16 00:45:44 +01:00
parent 8f734ccbb4
commit 060f1488e0

View File

@ -147,8 +147,8 @@ test_coglbox_init (TestCoglbox *self)
/* Obtain pixel data */ /* Obtain pixel data */
format = cogl_texture_get_format (priv->cogl_tex_id[0]); format = cogl_texture_get_format (priv->cogl_tex_id[0]);
g_assert(format == COGL_PIXEL_FORMAT_RGBA_8888 || g_assert(format == COGL_PIXEL_FORMAT_RGBA_8888_PRE ||
format == COGL_PIXEL_FORMAT_ARGB_8888); format == COGL_PIXEL_FORMAT_ARGB_8888_PRE);
width = cogl_texture_get_width (priv->cogl_tex_id[0]); width = cogl_texture_get_width (priv->cogl_tex_id[0]);
height = cogl_texture_get_height (priv->cogl_tex_id[0]); height = cogl_texture_get_height (priv->cogl_tex_id[0]);
@ -188,7 +188,7 @@ test_coglbox_init (TestCoglbox *self)
for (x=0; x<width; ++x) for (x=0; x<width; ++x)
{ {
pixel = data + y * rowstride + x * 4; pixel = data + y * rowstride + x * 4;
if (format == COGL_PIXEL_FORMAT_RGBA_8888) if (format == COGL_PIXEL_FORMAT_RGBA_8888_PRE)
{ {
t = pixel[0]; t = pixel[0];
pixel[0] = pixel[1]; pixel[0] = pixel[1];