testsuite: Use a proper texture on objects-finalize test

This commit is contained in:
Benjamin Otte 2024-06-28 19:42:41 +02:00 committed by Matthias Clasen
parent 3073704010
commit 830846b39c

View File

@ -69,6 +69,13 @@ test_finalize_object (gconstpointer data)
NULL);
gdk_content_formats_unref (formats);
}
else if (g_type_is_a (test_type, GDK_TYPE_TEXTURE))
{
static const guint8 pixels[4] = { 0xff, 0x00, 0x00, 0xff };
GBytes *bytes = g_bytes_new_static (pixels, sizeof (pixels));
object = (GObject *) gdk_memory_texture_new (1, 1, GDK_MEMORY_DEFAULT, bytes, 4);
g_bytes_unref (bytes);
}
else if (g_type_is_a (test_type, GSK_TYPE_GL_SHADER))
{
GBytes *bytes = g_bytes_new_static ("", 0);