mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
tests/cogl: Migrate pixel buffer tests
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>
This commit is contained in:
parent
9305f8d9d8
commit
6c8b12c4de
@ -1,6 +1,5 @@
|
||||
cogl_test_conformance_sources = [
|
||||
'test-conform-main.c',
|
||||
'test-pixel-buffer.c',
|
||||
'test-premult.c',
|
||||
'test-snippets.c',
|
||||
'test-wrap-modes.c',
|
||||
|
@ -69,9 +69,6 @@ main (int argc, char **argv)
|
||||
UNPORTED_TEST (test_multitexture);
|
||||
UNPORTED_TEST (test_texture_mipmaps);
|
||||
ADD_TEST (test_sub_texture, 0, 0);
|
||||
ADD_TEST (test_pixel_buffer_map, 0, 0);
|
||||
ADD_TEST (test_pixel_buffer_set_data, 0, 0);
|
||||
ADD_TEST (test_pixel_buffer_sub_region, 0, 0);
|
||||
UNPORTED_TEST (test_texture_rectangle);
|
||||
ADD_TEST (test_wrap_modes, 0, 0);
|
||||
UNPORTED_TEST (test_texture_pixmap_x11);
|
||||
|
@ -10,9 +10,6 @@ void test_layer_remove (void);
|
||||
void test_sparse_pipeline (void);
|
||||
void test_npot_texture (void);
|
||||
void test_sub_texture (void);
|
||||
void test_pixel_buffer_map (void);
|
||||
void test_pixel_buffer_set_data (void);
|
||||
void test_pixel_buffer_sub_region (void);
|
||||
void test_wrap_modes (void);
|
||||
void test_texture_get_set_data (void);
|
||||
void test_read_texture_formats (void);
|
||||
|
@ -8,6 +8,7 @@ cogl_tests = [
|
||||
'test-just-vertex-shader',
|
||||
'test-pipeline-user-matrix',
|
||||
'test-pipeline-uniforms',
|
||||
'test-pixel-buffer',
|
||||
]
|
||||
|
||||
cogl_test_conformance_includes = [
|
||||
|
@ -1,8 +1,7 @@
|
||||
#include <cogl/cogl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "test-declarations.h"
|
||||
#include "test-utils.h"
|
||||
#include "tests/cogl-test-utils.h"
|
||||
|
||||
#define BITMAP_SIZE 256
|
||||
|
||||
@ -135,7 +134,7 @@ check_colours (uint32_t color0,
|
||||
color3);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
test_pixel_buffer_map (void)
|
||||
{
|
||||
CoglBitmap *bitmap = create_and_fill_bitmap ();
|
||||
@ -163,7 +162,7 @@ test_pixel_buffer_map (void)
|
||||
g_print ("OK\n");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
test_pixel_buffer_set_data (void)
|
||||
{
|
||||
CoglBitmap *bitmap = create_bitmap ();
|
||||
@ -229,7 +228,7 @@ create_white_texture (void)
|
||||
return texture;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
test_pixel_buffer_sub_region (void)
|
||||
{
|
||||
CoglBitmap *bitmap = create_and_fill_bitmap ();
|
||||
@ -268,3 +267,9 @@ test_pixel_buffer_sub_region (void)
|
||||
if (cogl_test_verbose ())
|
||||
g_print ("OK\n");
|
||||
}
|
||||
|
||||
COGL_TEST_SUITE (
|
||||
g_test_add_func ("/pixel-buffer/map", test_pixel_buffer_map);
|
||||
g_test_add_func ("/pixel-buffer/set-data", test_pixel_buffer_set_data);
|
||||
g_test_add_func ("/pixel-buffer/sub-region", test_pixel_buffer_sub_region);
|
||||
)
|
Loading…
Reference in New Issue
Block a user