diff options
Diffstat (limited to 'tests/conform')
50 files changed, 144 insertions, 144 deletions
diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am index 083d734b..d198ba34 100644 --- a/tests/conform/Makefile.am +++ b/tests/conform/Makefile.am @@ -129,6 +129,8 @@ BUILT_SOURCES = wrappers AM_CPPFLAGS = \ -I$(top_srcdir) \ + -I$(top_srcdir)/deps/ulib/src \ + -I$(top_builddir)/deps/ulib/src \ -I$(top_builddir)/cogl \ -I$(top_srcdir)/test-fixtures @@ -144,9 +146,7 @@ test_conformance_LDADD = \ if BUILD_COGL_PATH test_conformance_LDADD += $(top_builddir)/cogl-path/libcogl-path.la endif -if !USE_GLIB -test_conformance_LDADD += $(top_builddir)/deps/eglib/src/libeglib.la -endif +test_conformance_LDADD += $(top_builddir)/deps/ulib/src/libulib.la test_conformance_LDFLAGS = -export-dynamic test: wrappers diff --git a/tests/conform/test-alpha-test.c b/tests/conform/test-alpha-test.c index e74f6d8e..cf9b7b0d 100644 --- a/tests/conform/test-alpha-test.c +++ b/tests/conform/test-alpha-test.c @@ -68,6 +68,6 @@ test_alpha_test (void) 0x0000ffff); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-alpha-textures.c b/tests/conform/test-alpha-textures.c index f4ad49bb..c4053a78 100644 --- a/tests/conform/test-alpha-textures.c +++ b/tests/conform/test-alpha-textures.c @@ -118,6 +118,6 @@ test_alpha_textures (void) 0xffffffff); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-atlas-migration.c b/tests/conform/test-atlas-migration.c index 39e8a3c1..d5fa47b9 100644 --- a/tests/conform/test-atlas-migration.c +++ b/tests/conform/test-atlas-migration.c @@ -31,7 +31,7 @@ create_texture (int size) /* Create a red, green or blue texture depending on the size */ color = COLOR_FOR_SIZE (size); - p = data = g_malloc (size * size * 4); + p = data = u_malloc (size * size * 4); /* Fill the data with the color but fade the opacity out with increasing y coordinates so that we can see the blending it the @@ -77,7 +77,7 @@ verify_texture (CoglTexture *texture, int size) color = COLOR_FOR_SIZE (size); - p = data = g_malloc (size * size * 4); + p = data = u_malloc (size * size * 4); cogl_texture_get_data (texture, COGL_PIXEL_FORMAT_RGBA_8888_PRE, @@ -141,5 +141,5 @@ test_atlas_migration (void) cogl_object_unref (textures[tex_num]); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-backface-culling.c b/tests/conform/test-backface-culling.c index 02836d82..7573bcfb 100644 --- a/tests/conform/test-backface-culling.c +++ b/tests/conform/test-backface-culling.c @@ -200,7 +200,7 @@ make_texture (void) guchar *tex_data, *p; CoglTexture *tex; - tex_data = g_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4); + tex_data = u_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4); for (p = tex_data + TEXTURE_SIZE * TEXTURE_SIZE * 4; p > tex_data;) { @@ -250,6 +250,6 @@ test_backface_culling (void) cogl_object_unref (state.texture); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-blend-strings.c b/tests/conform/test-blend-strings.c index 4c1a09b9..cfb3bb0c 100644 --- a/tests/conform/test-blend-strings.c +++ b/tests/conform/test-blend-strings.c @@ -86,7 +86,7 @@ test_blend (TestState *state, { g_debug ("Failed to test blend string %s: %s", blend_string, error->message); - g_print ("Skipping\n"); + u_print ("Skipping\n"); } return; } @@ -109,14 +109,14 @@ test_blend (TestState *state, if (cogl_test_verbose ()) { - g_print ("test_blend (%d, %d):\n%s\n", x, y, blend_string); - g_print (" src color = %02x, %02x, %02x, %02x\n", Sr, Sg, Sb, Sa); - g_print (" dst color = %02x, %02x, %02x, %02x\n", Dr, Dg, Db, Da); + u_print ("test_blend (%d, %d):\n%s\n", x, y, blend_string); + u_print (" src color = %02x, %02x, %02x, %02x\n", Sr, Sg, Sb, Sa); + u_print (" dst color = %02x, %02x, %02x, %02x\n", Dr, Dg, Db, Da); if (blend_constant != BLEND_CONSTANT_UNUSED) - g_print (" blend constant = %02x, %02x, %02x, %02x\n", + u_print (" blend constant = %02x, %02x, %02x, %02x\n", Br, Bg, Bb, Ba); else - g_print (" blend constant = UNUSED\n"); + u_print (" blend constant = UNUSED\n"); } test_utils_check_pixel (test_fb, x_off, y_off, expected_result); @@ -132,7 +132,7 @@ make_texture (uint32_t color) uint8_t a = MASK_ALPHA (color); CoglTexture *tex; - tex_data = g_malloc (QUAD_WIDTH * QUAD_WIDTH * 4); + tex_data = u_malloc (QUAD_WIDTH * QUAD_WIDTH * 4); for (p = tex_data + QUAD_WIDTH * QUAD_WIDTH * 4; p > tex_data;) { @@ -226,14 +226,14 @@ test_tex_combine (TestState *state, if (cogl_test_verbose ()) { - g_print ("test_tex_combine (%d, %d):\n%s\n", x, y, combine_string); - g_print (" texture 0 color = 0x%08lX\n", (unsigned long)tex0_color); - g_print (" texture 1 color = 0x%08lX\n", (unsigned long)tex1_color); + u_print ("test_tex_combine (%d, %d):\n%s\n", x, y, combine_string); + u_print (" texture 0 color = 0x%08lX\n", (unsigned long)tex0_color); + u_print (" texture 1 color = 0x%08lX\n", (unsigned long)tex1_color); if (combine_constant != TEX_CONSTANT_UNUSED) - g_print (" combine constant = %02x, %02x, %02x, %02x\n", + u_print (" combine constant = %02x, %02x, %02x, %02x\n", Cr, Cg, Cb, Ca); else - g_print (" combine constant = UNUSED\n"); + u_print (" combine constant = UNUSED\n"); } test_utils_check_pixel (test_fb, x_off, y_off, expected_result); @@ -369,6 +369,6 @@ test_blend_strings (void) paint (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-color-hsl.c b/tests/conform/test-color-hsl.c index 8c51cd9e..2c03c7ad 100644 --- a/tests/conform/test-color-hsl.c +++ b/tests/conform/test-color-hsl.c @@ -41,5 +41,5 @@ test_color_hsl (void) cogl_assert_float(color.alpha, 1.0f); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-color-mask.c b/tests/conform/test-color-mask.c index 4cbfb983..a56ddf92 100644 --- a/tests/conform/test-color-mask.c +++ b/tests/conform/test-color-mask.c @@ -101,6 +101,6 @@ test_color_mask (void) paint (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c index 0cbaf09d..56d651e4 100644 --- a/tests/conform/test-conform-main.c +++ b/tests/conform/test-conform-main.c @@ -2,7 +2,7 @@ #include <cogl/cogl.h> -#include <glib.h> +#include <ulib.h> #include <locale.h> #include <stdlib.h> #include <string.h> @@ -11,7 +11,7 @@ /* A bit of sugar for adding new conformance tests */ #define ADD_TEST(FUNC, REQUIREMENTS, KNOWN_FAIL_REQUIREMENTS) \ - G_STMT_START { \ + U_STMT_START { \ extern void FUNC (void); \ if (strcmp (#FUNC, argv[1]) == 0) \ { \ @@ -20,7 +20,7 @@ test_utils_fini (); \ exit (0); \ } \ - } G_STMT_END + } U_STMT_END #define UNPORTED_TEST(FUNC) @@ -31,7 +31,7 @@ main (int argc, char **argv) if (argc != 2) { - g_printerr ("usage %s UNIT_TEST\n", argv[0]); + u_printerr ("usage %s UNIT_TEST\n", argv[0]); exit (1); } @@ -155,7 +155,7 @@ main (int argc, char **argv) ADD_TEST (test_texture_rg, TEST_REQUIREMENT_TEXTURE_RG, 0); - g_printerr ("Unknown test name \"%s\"\n", argv[1]); + u_printerr ("Unknown test name \"%s\"\n", argv[1]); return 1; } diff --git a/tests/conform/test-copy-replace-texture.c b/tests/conform/test-copy-replace-texture.c index f11070ee..0ed07d61 100644 --- a/tests/conform/test-copy-replace-texture.c +++ b/tests/conform/test-copy-replace-texture.c @@ -89,13 +89,13 @@ test_copy_replace_texture (void) { int i; - g_print ("Alive textures:"); + u_print ("Alive textures:"); for (i = 0; i < N_PIPELINES * N_LAYERS; i++) if ((alive_texture_mask & (1 << (i + 1)))) - g_print (" %i", i); + u_print (" %i", i); - g_print ("\n"); + u_print ("\n"); } /* Ideally there should only be the textures from the last pipeline @@ -116,5 +116,5 @@ test_copy_replace_texture (void) g_assert_cmpint (alive_texture_mask, ==, 0); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-custom-attributes.c b/tests/conform/test-custom-attributes.c index 633dc2ad..0c65c506 100644 --- a/tests/conform/test-custom-attributes.c +++ b/tests/conform/test-custom-attributes.c @@ -50,13 +50,13 @@ test_float_verts (TestState *state, int offset_x, int offset_y) attributes[0] = cogl_attribute_new (buffer, "cogl_position_in", sizeof (FloatVert), - G_STRUCT_OFFSET (FloatVert, x), + U_STRUCT_OFFSET (FloatVert, x), 2, /* n_components */ COGL_ATTRIBUTE_TYPE_SHORT); attributes[1] = cogl_attribute_new (buffer, "color", sizeof (FloatVert), - G_STRUCT_OFFSET (FloatVert, r), + U_STRUCT_OFFSET (FloatVert, r), 4, /* n_components */ COGL_ATTRIBUTE_TYPE_FLOAT); @@ -110,13 +110,13 @@ test_byte_verts (TestState *state, int offset_x, int offset_y) attributes[0] = cogl_attribute_new (buffer, "cogl_position_in", sizeof (ByteVert), - G_STRUCT_OFFSET (ByteVert, x), + U_STRUCT_OFFSET (ByteVert, x), 2, /* n_components */ COGL_ATTRIBUTE_TYPE_SHORT); attributes[1] = cogl_attribute_new (buffer, "color", sizeof (ByteVert), - G_STRUCT_OFFSET (ByteVert, r), + U_STRUCT_OFFSET (ByteVert, r), 4, /* n_components */ COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE); cogl_attribute_set_normalized (attributes[1], TRUE); @@ -140,7 +140,7 @@ test_byte_verts (TestState *state, int offset_x, int offset_y) attributes[1] = cogl_attribute_new (unnorm_buffer, "color", sizeof (ByteVert), - G_STRUCT_OFFSET (ByteVert, r), + U_STRUCT_OFFSET (ByteVert, r), 4, /* n_components */ COGL_ATTRIBUTE_TYPE_BYTE); @@ -191,13 +191,13 @@ test_short_verts (TestState *state, int offset_x, int offset_y) attributes[0] = cogl_attribute_new (buffer, "cogl_position_in", sizeof (ShortVert), - G_STRUCT_OFFSET (ShortVert, x), + U_STRUCT_OFFSET (ShortVert, x), 2, /* n_components */ COGL_ATTRIBUTE_TYPE_SHORT); attributes[1] = cogl_attribute_new (buffer, "color", sizeof (ShortVert), - G_STRUCT_OFFSET (ShortVert, r), + U_STRUCT_OFFSET (ShortVert, r), 4, /* n_components */ COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT); cogl_attribute_set_normalized (attributes[1], TRUE); @@ -223,7 +223,7 @@ test_short_verts (TestState *state, int offset_x, int offset_y) attributes[0] = cogl_attribute_new (buffer, "cogl_position_in", sizeof (ShortVert), - G_STRUCT_OFFSET (ShortVert, x), + U_STRUCT_OFFSET (ShortVert, x), 2, /* n_components */ COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT); @@ -297,5 +297,5 @@ test_custom_attributes (void) cogl_object_unref (snippet); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-depth-test.c b/tests/conform/test-depth-test.c index 7b9cdf77..b354876d 100644 --- a/tests/conform/test-depth-test.c +++ b/tests/conform/test-depth-test.c @@ -230,6 +230,6 @@ test_depth_test (void) paint (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-euler-quaternion.c b/tests/conform/test-euler-quaternion.c index c250bec0..920e588f 100644 --- a/tests/conform/test-euler-quaternion.c +++ b/tests/conform/test-euler-quaternion.c @@ -77,5 +77,5 @@ test_euler_quaternion (void) /* FIXME: This needs a lot more tests! */ if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-fence.c b/tests/conform/test-fence.c index d5e3586f..87beb46a 100644 --- a/tests/conform/test-fence.c +++ b/tests/conform/test-fence.c @@ -59,5 +59,5 @@ test_fence (void) g_main_loop_run (loop); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-gles2-context.c b/tests/conform/test-gles2-context.c index 5e1d2784..8494e607 100644 --- a/tests/conform/test-gles2-context.c +++ b/tests/conform/test-gles2-context.c @@ -258,7 +258,7 @@ create_gles2_framebuffer (const CoglGLES2Vtable *gles2, status = gles2->glCheckFramebufferStatus (GL_FRAMEBUFFER); if (cogl_test_verbose ()) - g_print ("status for gles2 framebuffer = 0x%x %s\n", + u_print ("status for gles2 framebuffer = 0x%x %s\n", status, status == GL_FRAMEBUFFER_COMPLETE ? "(complete)" : "(?)"); gles2->glBindFramebuffer (GL_FRAMEBUFFER, 0); @@ -368,7 +368,7 @@ test_gles2_context (void) test_gles2_read_pixels (); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } static GLuint @@ -609,7 +609,7 @@ static void verify_read_pixels (const PaintData *data) { int stride = data->fb_width * 4; - uint8_t *buf = g_malloc (data->fb_height * stride); + uint8_t *buf = u_malloc (data->fb_height * stride); data->gles2->glReadPixels (0, 0, /* x/y */ data->fb_width, data->fb_height, @@ -663,7 +663,7 @@ test_gles2_context_fbo (void) data.fb_width = cogl_framebuffer_get_width (test_fb); data.fb_height = cogl_framebuffer_get_height (test_fb); - for (i = 0; i < G_N_ELEMENTS (paint_methods); i++) + for (i = 0; i < U_N_ELEMENTS (paint_methods); i++) { CoglTexture *offscreen_texture; CoglOffscreen *offscreen; @@ -752,7 +752,7 @@ verify_region (const CoglGLES2Vtable *gles2, { uint8_t *buf, *p; - buf = g_malloc (width * height * 4); + buf = u_malloc (width * height * 4); gles2->glReadPixels (x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buf); diff --git a/tests/conform/test-just-vertex-shader.c b/tests/conform/test-just-vertex-shader.c index 1ed951c8..9e5138b9 100644 --- a/tests/conform/test-just-vertex-shader.c +++ b/tests/conform/test-just-vertex-shader.c @@ -99,5 +99,5 @@ test_just_vertex_shader (void) validate_result (test_fb); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-layer-remove.c b/tests/conform/test-layer-remove.c index de1efecc..4476491f 100644 --- a/tests/conform/test-layer-remove.c +++ b/tests/conform/test-layer-remove.c @@ -141,5 +141,5 @@ test_layer_remove (void) cogl_object_unref (pipeline1); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-map-buffer-range.c b/tests/conform/test-map-buffer-range.c index e9792405..7a0598e2 100644 --- a/tests/conform/test-map-buffer-range.c +++ b/tests/conform/test-map-buffer-range.c @@ -119,5 +119,5 @@ test_map_buffer_range (void) cogl_object_unref (tex); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-materials.c b/tests/conform/test-materials.c index 69c9c746..5185ab3a 100644 --- a/tests/conform/test-materials.c +++ b/tests/conform/test-materials.c @@ -248,6 +248,6 @@ test_materials (TestUtilsGTestFixture *fixture, g_source_remove (idle_source); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-multitexture.c b/tests/conform/test-multitexture.c index da38766a..18b40f0a 100644 --- a/tests/conform/test-multitexture.c +++ b/tests/conform/test-multitexture.c @@ -28,7 +28,7 @@ assert_region_color (int x, uint8_t blue, uint8_t alpha) { - uint8_t *data = g_malloc0 (width * height * 4); + uint8_t *data = u_malloc0 (width * height * 4); cogl_read_pixels (x, y, width, height, COGL_READ_PIXELS_COLOR_BUFFER, COGL_PIXEL_FORMAT_RGBA_8888_PRE, @@ -68,7 +68,7 @@ make_texture (guchar ref) CoglHandle tex; guchar val; - tex_data = g_malloc (QUAD_WIDTH * QUAD_WIDTH * 16); + tex_data = u_malloc (QUAD_WIDTH * QUAD_WIDTH * 16); for (y = 0; y < QUAD_WIDTH * 2; y++) for (x = 0; x < QUAD_WIDTH * 2; x++) @@ -202,5 +202,5 @@ test_multitexture (TestUtilsGTestFixture *fixture, g_source_remove (idle_source); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-npot-texture.c b/tests/conform/test-npot-texture.c index 85c16c96..d3757875 100644 --- a/tests/conform/test-npot-texture.c +++ b/tests/conform/test-npot-texture.c @@ -60,7 +60,7 @@ make_texture (void) CoglTexture *tex; int partx, party, width, height; - p = tex_data = g_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4); + p = tex_data = u_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4); /* Make a texture with a different color for each part */ for (party = 0; party < PARTS; party++) @@ -100,9 +100,9 @@ make_texture (void) if (cogl_test_verbose ()) { if (cogl_texture_is_sliced (tex)) - g_print ("Texture is sliced\n"); + u_print ("Texture is sliced\n"); else - g_print ("Texture is not sliced\n"); + u_print ("Texture is not sliced\n"); } /* The texture should be sliced unless NPOTs are supported */ @@ -149,9 +149,9 @@ test_npot_texture (void) if (cogl_test_verbose ()) { if (cogl_has_feature (test_ctx, COGL_FEATURE_ID_TEXTURE_NPOT)) - g_print ("NPOT textures are supported\n"); + u_print ("NPOT textures are supported\n"); else - g_print ("NPOT textures are not supported\n"); + u_print ("NPOT textures are not supported\n"); } cogl_framebuffer_orthographic (test_fb, @@ -165,6 +165,6 @@ test_npot_texture (void) validate_result (); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-object.c b/tests/conform/test-object.c index 0a6dcab6..4d22561a 100644 --- a/tests/conform/test-object.c +++ b/tests/conform/test-object.c @@ -81,6 +81,6 @@ test_object (TestUtilsGTestFixture *fixture, g_assert_cmpint (destroy2_count, ==, 1); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-offscreen.c b/tests/conform/test-offscreen.c index dc329680..0797495e 100644 --- a/tests/conform/test-offscreen.c +++ b/tests/conform/test-offscreen.c @@ -194,5 +194,5 @@ test_offscreen (void) test_flush (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-path-clip.c b/tests/conform/test-path-clip.c index 18f43396..efdf706b 100644 --- a/tests/conform/test-path-clip.c +++ b/tests/conform/test-path-clip.c @@ -63,5 +63,5 @@ test_path_clip (void) 0x0000ffff); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-path.c b/tests/conform/test-path.c index 01cee551..7b4b6334 100644 --- a/tests/conform/test-path.c +++ b/tests/conform/test-path.c @@ -207,6 +207,6 @@ test_path (void) validate_result (); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-pipeline-cache-unrefs-texture.c b/tests/conform/test-pipeline-cache-unrefs-texture.c index 5d278dcd..5cd243ed 100644 --- a/tests/conform/test-pipeline-cache-unrefs-texture.c +++ b/tests/conform/test-pipeline-cache-unrefs-texture.c @@ -87,5 +87,5 @@ test_pipeline_cache_unrefs_texture (void) g_assert_cmpint (destroyed_texture_count, ==, N_TEXTURES); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-pipeline-uniforms.c b/tests/conform/test-pipeline-uniforms.c index 3b41af01..436528d3 100644 --- a/tests/conform/test-pipeline-uniforms.c +++ b/tests/conform/test-pipeline-uniforms.c @@ -402,5 +402,5 @@ test_pipeline_uniforms (void) destroy_state (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-pixel-buffer.c b/tests/conform/test-pixel-buffer.c index d3102f27..ef62cfa4 100644 --- a/tests/conform/test-pixel-buffer.c +++ b/tests/conform/test-pixel-buffer.c @@ -160,7 +160,7 @@ test_pixel_buffer_map (void) 0xff0000ff); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } void @@ -175,7 +175,7 @@ test_pixel_buffer_set_data (void) stride = cogl_bitmap_get_rowstride (bitmap); - data = g_malloc (stride * BITMAP_SIZE); + data = u_malloc (stride * BITMAP_SIZE); generate_bitmap_data (data, stride); @@ -206,14 +206,14 @@ test_pixel_buffer_set_data (void) 0xff0000ff); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } static CoglTexture * create_white_texture (void) { CoglTexture2D *texture; - uint8_t *data = g_malloc (BITMAP_SIZE * BITMAP_SIZE * 4); + uint8_t *data = u_malloc (BITMAP_SIZE * BITMAP_SIZE * 4); memset (data, 255, BITMAP_SIZE * BITMAP_SIZE * 4); @@ -269,5 +269,5 @@ test_pixel_buffer_sub_region (void) 0xffffffff); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-point-size-attribute.c b/tests/conform/test-point-size-attribute.c index a08d1daa..76e73338 100644 --- a/tests/conform/test-point-size-attribute.c +++ b/tests/conform/test-point-size-attribute.c @@ -75,13 +75,13 @@ create_primitive (const char *attribute_name) attributes[0] = cogl_attribute_new (buffer, "cogl_position_in", sizeof (PointVertex), - G_STRUCT_OFFSET (PointVertex, x), + U_STRUCT_OFFSET (PointVertex, x), 2, /* n_components */ COGL_ATTRIBUTE_TYPE_FLOAT); attributes[1] = cogl_attribute_new (buffer, attribute_name, sizeof (PointVertex), - G_STRUCT_OFFSET (PointVertex, point_size), + U_STRUCT_OFFSET (PointVertex, point_size), 1, /* n_components */ COGL_ATTRIBUTE_TYPE_FLOAT); @@ -134,7 +134,7 @@ do_test (const char *attribute_name, MAX_POINT_SIZE - i /* point size */); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } void diff --git a/tests/conform/test-point-size.c b/tests/conform/test-point-size.c index 49d08332..27e15c30 100644 --- a/tests/conform/test-point-size.c +++ b/tests/conform/test-point-size.c @@ -95,5 +95,5 @@ test_point_size (void) point_size); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-point-sprite.c b/tests/conform/test-point-sprite.c index 65ce9a85..b0dcf211 100644 --- a/tests/conform/test-point-sprite.c +++ b/tests/conform/test-point-sprite.c @@ -169,7 +169,7 @@ do_test (CoglBool check_orientation, 0x0000ffff); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } void diff --git a/tests/conform/test-premult.c b/tests/conform/test-premult.c index 816c4873..fd8953fb 100644 --- a/tests/conform/test-premult.c +++ b/tests/conform/test-premult.c @@ -31,7 +31,7 @@ gen_tex_data (uint32_t color) uint8_t b = MASK_BLUE (color); uint8_t a = MASK_ALPHA (color); - tex_data = g_malloc (QUAD_WIDTH * QUAD_WIDTH * 4); + tex_data = u_malloc (QUAD_WIDTH * QUAD_WIDTH * 4); for (p = tex_data + QUAD_WIDTH * QUAD_WIDTH * 4; p > tex_data;) { @@ -132,7 +132,7 @@ test_premult (void) /* If the user explicitly specifies an unmultiplied internal format then * Cogl shouldn't automatically premultiply the given texture data... */ if (cogl_test_verbose ()) - g_print ("make_texture (0xff00ff80, " + u_print ("make_texture (0xff00ff80, " "src = RGBA_8888, internal = RGBA_8888)\n"); tex = make_texture (0xff00ff80, COGL_PIXEL_FORMAT_RGBA_8888, /* src format */ @@ -145,7 +145,7 @@ test_premult (void) * gives unmultiplied src data then Cogl should always premultiply that * for us */ if (cogl_test_verbose ()) - g_print ("make_texture (0xff00ff80, " + u_print ("make_texture (0xff00ff80, " "src = RGBA_8888, internal = RGBA_8888_PRE)\n"); tex = make_texture (0xff00ff80, COGL_PIXEL_FORMAT_RGBA_8888, /* src format */ @@ -159,7 +159,7 @@ test_premult (void) * unpremultiplied texture data... */ if (cogl_test_verbose ()) - g_print ("make_texture (0xff00ff80, " + u_print ("make_texture (0xff00ff80, " "src = RGBA_8888, internal = ANY)\n"); tex = make_texture (0xff00ff80, COGL_PIXEL_FORMAT_RGBA_8888, /* src format */ @@ -172,7 +172,7 @@ test_premult (void) * premultiplied source data, Cogl should never modify that source data... */ if (cogl_test_verbose ()) - g_print ("make_texture (0x80008080, " + u_print ("make_texture (0x80008080, " "src = RGBA_8888_PRE, " "internal = RGBA_8888_PRE)\n"); tex = make_texture (0x80008080, @@ -186,7 +186,7 @@ test_premult (void) * supplies premultiplied source data, then Cogl should always * un-premultiply the source data... */ if (cogl_test_verbose ()) - g_print ("make_texture (0x80008080, " + u_print ("make_texture (0x80008080, " "src = RGBA_8888_PRE, internal = RGBA_8888)\n"); tex = make_texture (0x80008080, COGL_PIXEL_FORMAT_RGBA_8888_PRE, /* src format */ @@ -200,7 +200,7 @@ test_premult (void) * (In the future there will be additional Cogl API to control this * behaviour) */ if (cogl_test_verbose ()) - g_print ("make_texture (0x80008080, " + u_print ("make_texture (0x80008080, " "src = RGBA_8888_PRE, internal = ANY)\n"); tex = make_texture (0x80008080, COGL_PIXEL_FORMAT_RGBA_8888_PRE, /* src format */ @@ -214,13 +214,13 @@ test_premult (void) */ if (cogl_test_verbose ()) - g_print ("make_texture (0xDEADBEEF, " + u_print ("make_texture (0xDEADBEEF, " "src = RGBA_8888, internal = RGBA_8888)\n"); tex = make_texture (0xDEADBEEF, COGL_PIXEL_FORMAT_RGBA_8888, /* src format */ TEXTURE_FLAG_SET_UNPREMULTIPLIED); if (cogl_test_verbose ()) - g_print ("set_region (0xff00ff80, RGBA_8888)\n"); + u_print ("set_region (0xff00ff80, RGBA_8888)\n"); set_region (tex, 0xff00ff80, COGL_PIXEL_FORMAT_RGBA_8888); check_texture (pipeline, 6, 0, /* position */ tex, @@ -230,13 +230,13 @@ test_premult (void) * region data should result in Cogl unmultiplying the given region data... */ if (cogl_test_verbose ()) - g_print ("make_texture (0xDEADBEEF, " + u_print ("make_texture (0xDEADBEEF, " "src = RGBA_8888, internal = RGBA_8888)\n"); tex = make_texture (0xDEADBEEF, COGL_PIXEL_FORMAT_RGBA_8888, /* src format */ TEXTURE_FLAG_SET_UNPREMULTIPLIED); if (cogl_test_verbose ()) - g_print ("set_region (0x80008080, RGBA_8888_PRE)\n"); + u_print ("set_region (0x80008080, RGBA_8888_PRE)\n"); set_region (tex, 0x80008080, COGL_PIXEL_FORMAT_RGBA_8888_PRE); check_texture (pipeline, 7, 0, /* position */ tex, @@ -244,14 +244,14 @@ test_premult (void) if (cogl_test_verbose ()) - g_print ("make_texture (0xDEADBEEF, " + u_print ("make_texture (0xDEADBEEF, " "src = RGBA_8888_PRE, " "internal = RGBA_8888_PRE)\n"); tex = make_texture (0xDEADBEEF, COGL_PIXEL_FORMAT_RGBA_8888_PRE, /* src format */ TEXTURE_FLAG_SET_PREMULTIPLIED); if (cogl_test_verbose ()) - g_print ("set_region (0x80008080, RGBA_8888_PRE)\n"); + u_print ("set_region (0x80008080, RGBA_8888_PRE)\n"); set_region (tex, 0x80008080, COGL_PIXEL_FORMAT_RGBA_8888_PRE); check_texture (pipeline, 8, 0, /* position */ tex, @@ -262,14 +262,14 @@ test_premult (void) * region data should result in Cogl premultiplying the given region data... */ if (cogl_test_verbose ()) - g_print ("make_texture (0xDEADBEEF, " + u_print ("make_texture (0xDEADBEEF, " "src = RGBA_8888_PRE, " "internal = RGBA_8888_PRE)\n"); tex = make_texture (0xDEADBEEF, COGL_PIXEL_FORMAT_RGBA_8888_PRE, /* src format */ TEXTURE_FLAG_SET_PREMULTIPLIED); if (cogl_test_verbose ()) - g_print ("set_region (0xff00ff80, RGBA_8888)\n"); + u_print ("set_region (0xff00ff80, RGBA_8888)\n"); set_region (tex, 0xff00ff80, COGL_PIXEL_FORMAT_RGBA_8888); check_texture (pipeline, 9, 0, /* position */ tex, @@ -277,6 +277,6 @@ test_premult (void) if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-primitive-and-journal.c b/tests/conform/test-primitive-and-journal.c index f978cd5e..c728b150 100644 --- a/tests/conform/test-primitive-and-journal.c +++ b/tests/conform/test-primitive-and-journal.c @@ -46,7 +46,7 @@ create_primitives (CoglPrimitive *primitives[2]) primitives[0] = cogl_primitive_new_p2c4 (test_ctx, COGL_VERTICES_MODE_TRIANGLE_STRIP, - G_N_ELEMENTS (vertex_data), + U_N_ELEMENTS (vertex_data), vertex_data); cogl_primitive_set_n_vertices (primitives[0], 4); @@ -117,6 +117,6 @@ test_primitive_and_journal (void) cogl_framebuffer_pop_clip (test_fb); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-primitive.c b/tests/conform/test-primitive.c index 1cd2ffca..738d659d 100644 --- a/tests/conform/test-primitive.c +++ b/tests/conform/test-primitive.c @@ -185,7 +185,7 @@ test_paint (TestState *state) cogl_pipeline_set_layer_texture (pipeline, 0, tex); cogl_object_unref (tex); - for (i = 0; i < G_N_ELEMENTS (test_prim_funcs); i++) + for (i = 0; i < U_N_ELEMENTS (test_prim_funcs); i++) { CoglPrimitive *prim; uint32_t expected_color = PRIM_COLOR; @@ -330,5 +330,5 @@ test_primitive (void) test_copy (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-read-texture-formats.c b/tests/conform/test-read-texture-formats.c index 4fa9eccc..26531365 100644 --- a/tests/conform/test-read-texture-formats.c +++ b/tests/conform/test-read-texture-formats.c @@ -211,5 +211,5 @@ test_read_texture_formats (void) cogl_object_unref (tex_2d); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-readpixels.c b/tests/conform/test-readpixels.c index 131b08b2..e2f30bf4 100644 --- a/tests/conform/test-readpixels.c +++ b/tests/conform/test-readpixels.c @@ -43,7 +43,7 @@ on_paint (ClutterActor *actor, void *state) * verify is reading back grid of colors from a CoglOffscreen framebuffer */ - data = g_malloc (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); + data = u_malloc (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); tex = test_utils_texture_new_from_data (FRAMEBUFFER_WIDTH, FRAMEBUFFER_HEIGHT, TEST_UTILS_TEXTURE_NO_SLICING, COGL_PIXEL_FORMAT_RGBA_8888, /* data fmt */ @@ -68,7 +68,7 @@ on_paint (ClutterActor *actor, void *state) cogl_set_source_color4ub (0xff, 0xff, 0xff, 0xff); cogl_rectangle (0, 0, 1, -1); - pixels = g_malloc0 (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); + pixels = u_malloc0 (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); cogl_read_pixels (0, 0, FRAMEBUFFER_WIDTH, FRAMEBUFFER_HEIGHT, COGL_READ_PIXELS_COLOR_BUFFER, COGL_PIXEL_FORMAT_RGBA_8888_PRE, @@ -89,7 +89,7 @@ on_paint (ClutterActor *actor, void *state) cogl_set_source_texture (tex); cogl_rectangle (-1, 1, 1, -1); - pixels = g_malloc0 (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); + pixels = u_malloc0 (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); cogl_read_pixels (0, 0, FRAMEBUFFER_WIDTH, FRAMEBUFFER_HEIGHT, COGL_READ_PIXELS_COLOR_BUFFER, COGL_PIXEL_FORMAT_RGBA_8888_PRE, @@ -106,7 +106,7 @@ on_paint (ClutterActor *actor, void *state) cogl_set_source_texture (tex); cogl_rectangle (-1, 1, 1, -1); - pixelsc = g_malloc0 (FRAMEBUFFER_WIDTH * 3 * FRAMEBUFFER_HEIGHT); + pixelsc = u_malloc0 (FRAMEBUFFER_WIDTH * 3 * FRAMEBUFFER_HEIGHT); cogl_read_pixels (0, 0, FRAMEBUFFER_WIDTH, FRAMEBUFFER_HEIGHT, COGL_READ_PIXELS_COLOR_BUFFER, COGL_PIXEL_FORMAT_BGR_888, @@ -173,6 +173,6 @@ test_readpixels (TestUtilsGTestFixture *fixture, NULL); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-snippets.c b/tests/conform/test-snippets.c index 96f32a08..d894c1aa 100644 --- a/tests/conform/test-snippets.c +++ b/tests/conform/test-snippets.c @@ -773,7 +773,7 @@ run_tests (TestState *state) { int i; - for (i = 0; i < G_N_ELEMENTS (tests); i++) + for (i = 0; i < U_N_ELEMENTS (tests); i++) { cogl_framebuffer_clear4f (test_fb, COGL_BUFFER_BIT_COLOR, @@ -801,5 +801,5 @@ test_snippets (void) run_tests (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-sparse-pipeline.c b/tests/conform/test-sparse-pipeline.c index 2b618dc5..ef0fda2e 100644 --- a/tests/conform/test-sparse-pipeline.c +++ b/tests/conform/test-sparse-pipeline.c @@ -57,6 +57,6 @@ test_sparse_pipeline (void) work */ if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-sub-texture.c b/tests/conform/test-sub-texture.c index cec5b67d..812f950a 100644 --- a/tests/conform/test-sub-texture.c +++ b/tests/conform/test-sub-texture.c @@ -29,7 +29,7 @@ static CoglTexture2D * create_source (TestState *state) { int dx, dy; - uint8_t *data = g_malloc (SOURCE_SIZE * SOURCE_SIZE * 4); + uint8_t *data = u_malloc (SOURCE_SIZE * SOURCE_SIZE * 4); CoglTexture2D *tex; /* Create a texture with a different coloured rectangle at each @@ -67,7 +67,7 @@ static CoglTexture2D * create_test_texture (TestState *state) { CoglTexture2D *tex; - uint8_t *data = g_malloc (256 * 256 * 4), *p = data; + uint8_t *data = u_malloc (256 * 256 * 4), *p = data; int x, y; /* Create a texture that is 256x256 where the red component ranges @@ -169,7 +169,7 @@ validate_part (int xpos, int ypos, static uint8_t * create_update_data (void) { - uint8_t *data = g_malloc (256 * 256 * 4), *p = data; + uint8_t *data = u_malloc (256 * 256 * 4), *p = data; int x, y; /* Create some image data that is 256x256 where the blue component @@ -212,7 +212,7 @@ validate_result (TestState *state) corner_colors[division_num]); /* Sub sub texture */ - p = texture_data = g_malloc (10 * 10 * 4); + p = texture_data = u_malloc (10 * 10 * 4); cogl_framebuffer_read_pixels (test_fb, 0, SOURCE_SIZE * 2, 10, 10, COGL_PIXEL_FORMAT_RGBA_8888, @@ -235,7 +235,7 @@ validate_result (TestState *state) SOURCE_SIZE / 2); tex_width = cogl_texture_get_width (sub_texture); tex_height = cogl_texture_get_height (sub_texture); - p = texture_data = g_malloc (tex_width * tex_height * 4); + p = texture_data = u_malloc (tex_width * tex_height * 4); cogl_texture_get_data (sub_texture, COGL_PIXEL_FORMAT_RGBA_8888, tex_width * 4, @@ -275,7 +275,7 @@ validate_result (TestState *state) g_free (texture_data); cogl_object_unref (sub_texture); /* Get the texture data */ - p = texture_data = g_malloc (256 * 256 * 4); + p = texture_data = u_malloc (256 * 256 * 4); cogl_texture_get_data (test_tex, COGL_PIXEL_FORMAT_RGBA_8888_PRE, 256 * 4, texture_data); @@ -324,6 +324,6 @@ test_sub_texture (void) cogl_object_unref (state.tex); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-texture-3d.c b/tests/conform/test-texture-3d.c index 80d077a1..311f8577 100644 --- a/tests/conform/test-texture-3d.c +++ b/tests/conform/test-texture-3d.c @@ -21,7 +21,7 @@ static CoglTexture3D * create_texture_3d (CoglContext *context) { int x, y, z; - uint8_t *data = g_malloc (TEX_IMAGE_STRIDE * TEX_DEPTH); + uint8_t *data = u_malloc (TEX_IMAGE_STRIDE * TEX_DEPTH); uint8_t *p = data; CoglTexture3D *tex; CoglError *error = NULL; @@ -136,13 +136,13 @@ draw_frame (TestState *state) attributes[0] = cogl_attribute_new (attribute_buffer, "cogl_position_in", sizeof (Vert), - G_STRUCT_OFFSET (Vert, x), + U_STRUCT_OFFSET (Vert, x), 2, /* n_components */ COGL_ATTRIBUTE_TYPE_FLOAT); attributes[1] = cogl_attribute_new (attribute_buffer, "cogl_tex_coord_in", sizeof (Vert), - G_STRUCT_OFFSET (Vert, s), + U_STRUCT_OFFSET (Vert, s), 3, /* n_components */ COGL_ATTRIBUTE_TYPE_FLOAT); primitive = cogl_primitive_new_with_attributes (COGL_VERTICES_MODE_TRIANGLES, @@ -270,5 +270,5 @@ test_texture_3d (void) test_multi_texture (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-texture-get-set-data.c b/tests/conform/test-texture-get-set-data.c index 626823d7..858b6d7e 100644 --- a/tests/conform/test-texture-get-set-data.c +++ b/tests/conform/test-texture-get-set-data.c @@ -13,7 +13,7 @@ check_texture (int width, int height, TestUtilsTextureFlags flags) int rowstride; CoglBitmap *bmp; - p = data = g_malloc (width * height * 4); + p = data = u_malloc (width * height * 4); for (y = 0; y < height; y++) for (x = 0; x < width; x++) { diff --git a/tests/conform/test-texture-mipmap-get-set.c b/tests/conform/test-texture-mipmap-get-set.c index c4cd0be4..674f1ec4 100644 --- a/tests/conform/test-texture-mipmap-get-set.c +++ b/tests/conform/test-texture-mipmap-get-set.c @@ -13,7 +13,7 @@ make_texture (void) CoglTexture *tex; int x, y; - p = tex_data = g_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4); + p = tex_data = u_malloc (TEXTURE_SIZE * TEXTURE_SIZE * 4); for (y = 0; y < TEXTURE_SIZE; y++) { for (x = 0; x < TEXTURE_SIZE; x++) @@ -47,7 +47,7 @@ update_mipmap_levels (CoglTexture *tex) uint8_t *p, *tex_data; int x, y; - p = tex_data = g_malloc ((TEXTURE_SIZE / 2) * (TEXTURE_SIZE / 2) * 4); + p = tex_data = u_malloc ((TEXTURE_SIZE / 2) * (TEXTURE_SIZE / 2) * 4); for (y = 0; y < TEXTURE_SIZE / 2; y++) { @@ -169,6 +169,6 @@ test_texture_mipmap_get_set (void) validate_results (); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-texture-mipmaps.c b/tests/conform/test-texture-mipmaps.c index 3118ba86..6a1781e9 100644 --- a/tests/conform/test-texture-mipmaps.c +++ b/tests/conform/test-texture-mipmaps.c @@ -18,7 +18,7 @@ typedef struct _TestState static CoglHandle make_texture (void) { - guchar *tex_data = g_malloc (TEX_SIZE * TEX_SIZE * 3), *p = tex_data; + guchar *tex_data = u_malloc (TEX_SIZE * TEX_SIZE * 3), *p = tex_data; CoglHandle tex; int x, y; @@ -132,5 +132,5 @@ test_texture_mipmaps (TestUtilsGTestFixture *fixture, g_source_remove (idle_source); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-texture-no-allocate.c b/tests/conform/test-texture-no-allocate.c index 5bce8f67..ef61a3b1 100644 --- a/tests/conform/test-texture-no-allocate.c +++ b/tests/conform/test-texture-no-allocate.c @@ -18,7 +18,7 @@ test_texture_no_allocate (void) CoglTexture2D *texture_2d; CoglError *error = NULL; - tex_data = g_malloc (BIG_TEX_WIDTH * BIG_TEX_HEIGHT * 4); + tex_data = u_malloc (BIG_TEX_WIDTH * BIG_TEX_HEIGHT * 4); /* NB: if we make the atlas and sliced texture APIs public then this * could changed to explicitly use that instead of the magic texture diff --git a/tests/conform/test-texture-pixmap-x11.c b/tests/conform/test-texture-pixmap-x11.c index 4e8d5505..6db6b8bf 100644 --- a/tests/conform/test-texture-pixmap-x11.c +++ b/tests/conform/test-texture-pixmap-x11.c @@ -88,7 +88,7 @@ check_paint (TestState *state, int x, int y, int scale) { uint8_t *data, *p, update_value = 0; - p = data = g_malloc (PIXMAP_WIDTH * PIXMAP_HEIGHT * 4); + p = data = u_malloc (PIXMAP_WIDTH * PIXMAP_HEIGHT * 4); cogl_read_pixels (x, y, PIXMAP_WIDTH / scale, PIXMAP_HEIGHT / scale, COGL_READ_PIXELS_COLOR_BUFFER, @@ -233,12 +233,12 @@ test_texture_pixmap_x11 (TestUtilsGTestFixture *fixture, XFreePixmap (state.display, state.pixmap); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); #else /* COGL_HAS_XLIB */ if (cogl_test_verbose ()) - g_print ("Skipping\n"); + u_print ("Skipping\n"); #endif /* COGL_HAS_XLIB */ } diff --git a/tests/conform/test-texture-rectangle.c b/tests/conform/test-texture-rectangle.c index 3784cdcf..6a493802 100644 --- a/tests/conform/test-texture-rectangle.c +++ b/tests/conform/test-texture-rectangle.c @@ -21,7 +21,7 @@ create_source_rect (void) GLint prev_unpack_skip_rows; GLint prev_unpack_skip_pixles; GLint prev_rectangle_binding; - uint8_t *data = g_malloc (256 * 256 * 4), *p = data; + uint8_t *data = u_malloc (256 * 256 * 4), *p = data; CoglHandle tex; GLuint gl_tex; @@ -87,7 +87,7 @@ static CoglHandle create_source_2d (void) { int x, y; - uint8_t *data = g_malloc (256 * 256 * 4), *p = data; + uint8_t *data = u_malloc (256 * 256 * 4), *p = data; CoglHandle tex; for (y = 0; y < 256; y++) @@ -163,7 +163,7 @@ validate_result (TestState *state) uint8_t *data, *p; int x, y; - p = data = g_malloc (512 * 384 * 4); + p = data = u_malloc (512 * 384 * 4); cogl_read_pixels (0, 0, 512, 384, COGL_READ_PIXELS_COLOR_BUFFER, @@ -268,9 +268,9 @@ test_texture_rectangle (TestUtilsGTestFixture *fixture, g_signal_handler_disconnect (state.stage, paint_handler); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } else if (cogl_test_verbose ()) - g_print ("Skipping\n"); + u_print ("Skipping\n"); } diff --git a/tests/conform/test-version.c b/tests/conform/test-version.c index b651165e..0e484d74 100644 --- a/tests/conform/test-version.c +++ b/tests/conform/test-version.c @@ -80,6 +80,6 @@ test_version (void) g_assert_cmpstr (version, ==, "version = " COGL_VERSION_STRING); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-viewport.c b/tests/conform/test-viewport.c index a1937c42..494fa278 100644 --- a/tests/conform/test-viewport.c +++ b/tests/conform/test-viewport.c @@ -24,7 +24,7 @@ assert_region_color (int x, uint8_t blue, uint8_t alpha) { - uint8_t *data = g_malloc0 (width * height * 4); + uint8_t *data = u_malloc0 (width * height * 4); cogl_read_pixels (x, y, width, height, COGL_READ_PIXELS_COLOR_BUFFER, COGL_PIXEL_FORMAT_RGBA_8888_PRE, @@ -209,7 +209,7 @@ on_paint (ClutterActor *actor, void *state) /* * Next test offscreen drawing... */ - data = g_malloc (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); + data = u_malloc (FRAMEBUFFER_WIDTH * 4 * FRAMEBUFFER_HEIGHT); tex = test_utils_texture_new_from_data (FRAMEBUFFER_WIDTH, FRAMEBUFFER_HEIGHT, TEST_UTILS_TEXTURE_NO_SLICING, COGL_PIXEL_FORMAT_RGBA_8888, /* data fmt */ @@ -411,6 +411,6 @@ test_viewport (TestUtilsGTestFixture *fixture, NULL); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-wrap-modes.c b/tests/conform/test-wrap-modes.c index 5aea0eb0..cd99dcb8 100644 --- a/tests/conform/test-wrap-modes.c +++ b/tests/conform/test-wrap-modes.c @@ -15,7 +15,7 @@ typedef struct _TestState static CoglTexture * create_texture (TestUtilsTextureFlags flags) { - uint8_t *data = g_malloc (TEX_SIZE * TEX_SIZE * 4), *p = data; + uint8_t *data = u_malloc (TEX_SIZE * TEX_SIZE * 4), *p = data; CoglTexture *tex; int x, y; @@ -83,7 +83,7 @@ draw_tests (TestState *state) { int i; - for (i = 0; i < G_N_ELEMENTS (wrap_modes); i += 2) + for (i = 0; i < U_N_ELEMENTS (wrap_modes); i += 2) { CoglPipelineWrapMode wrap_mode_s, wrap_mode_t; CoglPipeline *pipeline; @@ -111,7 +111,7 @@ validate_set (TestState *state, int offset) uint8_t data[TEX_SIZE * 2 * TEX_SIZE * 2 * 4], *p; int x, y, i; - for (i = 0; i < G_N_ELEMENTS (wrap_modes); i += 2) + for (i = 0; i < U_N_ELEMENTS (wrap_modes); i += 2) { CoglPipelineWrapMode wrap_mode_s, wrap_mode_t; @@ -200,5 +200,5 @@ test_wrap_modes (void) paint (&state); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } diff --git a/tests/conform/test-write-texture-formats.c b/tests/conform/test-write-texture-formats.c index 4e6c02a1..d7e6d56b 100644 --- a/tests/conform/test-write-texture-formats.c +++ b/tests/conform/test-write-texture-formats.c @@ -166,5 +166,5 @@ test_write_texture_formats (void) -1); if (cogl_test_verbose ()) - g_print ("OK\n"); + u_print ("OK\n"); } |