diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c index 73f72c846..5afa0ed8f 100644 --- a/cogl/tests/conform/test-conform-main.c +++ b/cogl/tests/conform/test-conform-main.c @@ -55,7 +55,7 @@ main (int argc, char **argv) ADD_TEST (test_pipeline_user_matrix, 0, 0); ADD_TEST (test_blend_strings, 0, 0); ADD_TEST (test_blend, 0, 0); - ADD_TEST (test_premult, 0, TEST_KNOWN_FAILURE); + ADD_TEST (test_premult, 0, 0); UNPORTED_TEST (test_readpixels); ADD_TEST (test_depth_test, 0, 0); ADD_TEST (test_backface_culling, 0, TEST_REQUIREMENT_NPOT); diff --git a/cogl/tests/conform/test-premult.c b/cogl/tests/conform/test-premult.c index 70a67318a..cd0687d94 100644 --- a/cogl/tests/conform/test-premult.c +++ b/cogl/tests/conform/test-premult.c @@ -50,6 +50,7 @@ make_texture (uint32_t color, CoglPixelFormat src_format, MakeTextureFlags flags) { + static CoglUserDataKey bitmap_free_key; CoglTexture2D *tex_2d; guchar *tex_data = gen_tex_data (color); CoglBitmap *bmp = cogl_bitmap_new_for_data (test_ctx, @@ -58,6 +59,10 @@ make_texture (uint32_t color, src_format, QUAD_WIDTH * 4, tex_data); + cogl_object_set_user_data (COGL_OBJECT (bmp), + &bitmap_free_key, + tex_data, + g_free); tex_2d = cogl_texture_2d_new_from_bitmap (bmp); @@ -67,7 +72,6 @@ make_texture (uint32_t color, cogl_texture_set_premultiplied (tex_2d, FALSE); cogl_object_unref (bmp); - g_free (tex_data); return tex_2d; }