summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2021-10-18 13:38:35 +0200
committerBenjamin Otte <otte@redhat.com>2021-10-18 14:17:11 +0200
commita85947196051ef6c3aef6c9e85821bc4443f4214 (patch)
tree2de46ab018b8e33fd6a6a1ac6fce05356d9f80c5 /testsuite
parent5b473911627f3e2d6c6ced90665922743b7286be (diff)
downloadgtk+-a85947196051ef6c3aef6c9e85821bc4443f4214.tar.gz
testsuite: Add workarounds for non-gl backends
read: Fix tests for broadway
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gdk/memorytexture.c3
-rw-r--r--testsuite/gdk/texture-threads.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/testsuite/gdk/memorytexture.c b/testsuite/gdk/memorytexture.c
index 806f7f1d0a..03f8634c3f 100644
--- a/testsuite/gdk/memorytexture.c
+++ b/testsuite/gdk/memorytexture.c
@@ -526,7 +526,8 @@ create_texture (GdkMemoryFormat format,
case TEXTURE_METHOD_GL_RELEASED:
texture = upload_to_gl (texture);
- gdk_gl_texture_release (GDK_GL_TEXTURE (texture));
+ if (GDK_IS_GL_TEXTURE (texture))
+ gdk_gl_texture_release (GDK_GL_TEXTURE (texture));
break;
case TEXTURE_METHOD_PNG:
diff --git a/testsuite/gdk/texture-threads.c b/testsuite/gdk/texture-threads.c
index 11598812bf..5ca16e0ec5 100644
--- a/testsuite/gdk/texture-threads.c
+++ b/testsuite/gdk/texture-threads.c
@@ -70,11 +70,20 @@ texture_threads (void)
GMainLoop *loop;
GdkTexture *texture;
GTask *task;
+ GError *error = NULL;
/* 1. Get a GL renderer */
surface = gdk_surface_new_toplevel (gdk_display_get_default());
gl_renderer = gsk_gl_renderer_new ();
- g_assert_true (gsk_renderer_realize (gl_renderer, surface, NULL));
+ if (!gsk_renderer_realize (gl_renderer, surface, &error))
+ {
+ g_test_skip (error->message);
+
+ g_clear_error (&error);
+ g_clear_object (&gl_renderer);
+ g_clear_object (&surface);
+ return;
+ }
/* 2. Get a GL texture */
node = gsk_color_node_new (&(GdkRGBA) { 1, 0, 0, 1 }, &GRAPHENE_RECT_INIT(0, 0, 1, 1));