[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:
parent
8f734ccbb4
commit
060f1488e0
@ -147,8 +147,8 @@ test_coglbox_init (TestCoglbox *self)
|
||||
/* Obtain pixel data */
|
||||
|
||||
format = cogl_texture_get_format (priv->cogl_tex_id[0]);
|
||||
g_assert(format == COGL_PIXEL_FORMAT_RGBA_8888 ||
|
||||
format == COGL_PIXEL_FORMAT_ARGB_8888);
|
||||
g_assert(format == COGL_PIXEL_FORMAT_RGBA_8888_PRE ||
|
||||
format == COGL_PIXEL_FORMAT_ARGB_8888_PRE);
|
||||
|
||||
width = cogl_texture_get_width (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)
|
||||
{
|
||||
pixel = data + y * rowstride + x * 4;
|
||||
if (format == COGL_PIXEL_FORMAT_RGBA_8888)
|
||||
if (format == COGL_PIXEL_FORMAT_RGBA_8888_PRE)
|
||||
{
|
||||
t = pixel[0];
|
||||
pixel[0] = pixel[1];
|
||||
|
Loading…
Reference in New Issue
Block a user