diff options
author | Florian Müllner <fmuellner@gnome.org> | 2021-07-19 00:01:24 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2021-07-19 00:03:33 +0200 |
commit | 952865a86ebb08f97263cfdbfe38b7adc20e4560 (patch) | |
tree | 1f9347628656210b03ceee4fae83beb21491d1eb /cogl/tests/conform/test-fence.c | |
parent | 7862f143937e43dca0513af3a24dabfb4d0db4fc (diff) | |
download | mutter-master.tar.gz |
Replace contents with redirect messagemaster
The default development branch is now `main`. This commit only exists
on `master` to point people towards that.
See https://gitlab.gnome.org/GNOME/glib/-/issues/2348 for details.
Diffstat (limited to 'cogl/tests/conform/test-fence.c')
-rw-r--r-- | cogl/tests/conform/test-fence.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/cogl/tests/conform/test-fence.c b/cogl/tests/conform/test-fence.c deleted file mode 100644 index 6c429c1d7..000000000 --- a/cogl/tests/conform/test-fence.c +++ /dev/null @@ -1,60 +0,0 @@ -#include <cogl/cogl.h> - -#include "test-declarations.h" -#include "test-utils.h" -#include "cogl-config.h" - -/* I'm writing this on the train after having dinner at a churrascuria. */ -#define MAGIC_CHUNK_O_DATA ((void *) 0xdeadbeef) - -static GMainLoop *loop; - -static gboolean -timeout (void *user_data) -{ - g_assert (!"timeout not reached"); - - return FALSE; -} - -static void -callback (CoglFence *fence, - void *user_data) -{ - int fb_width = cogl_framebuffer_get_width (test_fb); - int fb_height = cogl_framebuffer_get_height (test_fb); - - test_utils_check_pixel (test_fb, fb_width - 1, fb_height - 1, 0x00ff0000); - g_assert (user_data == MAGIC_CHUNK_O_DATA && "callback data not mangled"); - - g_main_loop_quit (loop); -} - -void -test_fence (void) -{ - GSource *cogl_source; - int fb_width = cogl_framebuffer_get_width (test_fb); - int fb_height = cogl_framebuffer_get_height (test_fb); - CoglFenceClosure *closure; - - cogl_source = cogl_glib_source_new (test_ctx, G_PRIORITY_DEFAULT); - g_source_attach (cogl_source, NULL); - loop = g_main_loop_new (NULL, TRUE); - - cogl_framebuffer_orthographic (test_fb, 0, 0, fb_width, fb_height, -1, 100); - cogl_framebuffer_clear4f (test_fb, COGL_BUFFER_BIT_COLOR, - 0.0f, 1.0f, 0.0f, 0.0f); - - closure = cogl_framebuffer_add_fence_callback (test_fb, - callback, - MAGIC_CHUNK_O_DATA); - g_assert (closure != NULL); - - g_timeout_add_seconds (5, timeout, NULL); - - g_main_loop_run (loop); - - if (cogl_test_verbose ()) - g_print ("OK\n"); -} |