| 1 | #cxx . . $ `<file>/testsuite/gdk/dmabuf-support.c`/include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 2 | |
| 3 | #include <gtk/gtk.h>cxx . . $ `<file>/gtk/gtk.h`/ |
| 4 | #include "gdk/gdkdmabuffourccprivate.h"cxx . . $ `<file>/gdk/gdkdmabuffourccprivate.h`/ |
| 5 | #include "udmabuf.h"cxx . . $ `<file>/testsuite/gdk/udmabuf.h`/ |
| 6 | |
| 7 | static void |
| 8 | test_dmabuf_no_gpucxx . . $ test_dmabuf_no_gpu(49f6e7a06ebc5aa8). (void) |
| 9 | { |
| 10 | gucharcxx . . $ guchar# buffer[UDMABUF_STRIDE_ALIGNcxx . . $ `testsuite/gdk/udmabuf.h:5:9`!]; |
| 11 | GdkTexturecxx . . $ GdkTexture# *texture; |
| 12 | GErrorcxx . . $ GError# *error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 13 | GdkTextureDownloadercxx . . $ GdkTextureDownloader# *downloader; |
| 14 | gsizecxx . . $ gsize# stride; |
| 15 | GBytescxx . . $ GBytes# *bytes; |
| 16 | const gucharcxx . . $ guchar# *data; |
| 17 | |
| 18 | if (!udmabuf_initializecxx . . $ udmabuf_initialize(99147cdc3c1dad38). (&error)) |
| 19 | { |
| 20 | g_test_fail_printfcxx . . $ g_test_fail_printf(326aeb464d16410c). ("%s", error->messagecxx . . $ _GError#message.); |
| 21 | g_error_freecxx . . $ g_error_free(2ff7d11a2ecc01bd). (error); |
| 22 | return; |
| 23 | } |
| 24 | |
| 25 | buffer[0] = 255; |
| 26 | buffer[1] = 0; |
| 27 | buffer[2] = 0; |
| 28 | buffer[3] = 255; |
| 29 | |
| 30 | bytes = g_bytes_new_staticcxx . . $ g_bytes_new_static(d53317e535e97081). (buffer, G_N_ELEMENTScxx . . $ `<external>/12741050725406041920/gmacros.h:993:9`!(buffer)); |
| 31 | |
| 32 | texture = udmabuf_texture_newcxx . . $ udmabuf_texture_new(bd239635fa29721f). (1, 1, |
| 33 | DRM_FORMAT_RGBA8888cxx . . $ `<external>/2156383389880240121/drm_fourcc.h:182:9`!, |
| 34 | gdk_color_state_get_srgbcxx . . $ gdk_color_state_get_srgb(6b7eb4f7c55a0dc3). (), |
| 35 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 36 | bytes, |
| 37 | UDMABUF_STRIDE_ALIGNcxx . . $ `testsuite/gdk/udmabuf.h:5:9`!, |
| 38 | &error); |
| 39 | g_assert_no_errorcxx . . $ `<external>/15287032793271088244/gtestutils.h:217:9`! (error); |
| 40 | |
| 41 | g_bytes_unrefcxx . . $ g_bytes_unref(8fa06155751f251e). (bytes); |
| 42 | |
| 43 | downloader = gdk_texture_downloader_newcxx . . $ gdk_texture_downloader_new(b7a26057b8bfafc1). (texture); |
| 44 | gdk_texture_downloader_set_formatcxx . . $ gdk_texture_downloader_set_format(f9655a66992b052e). (downloader, gdk_texture_get_formatcxx . . $ gdk_texture_get_format(1cda2554811ccb0b). (texture)); |
| 45 | gdk_texture_downloader_set_color_statecxx . . $ gdk_texture_downloader_set_color_state(274415501bb7799d). (downloader, gdk_texture_get_color_statecxx . . $ gdk_texture_get_color_state(f424d3cc1ea19ea3). (texture)); |
| 46 | |
| 47 | bytes = gdk_texture_downloader_download_bytescxx . . $ gdk_texture_downloader_download_bytes(c7aa011941a936d4). (downloader, &stride); |
| 48 | |
| 49 | gdk_texture_downloader_freecxx . . $ gdk_texture_downloader_free(de357e450dee7ef3). (downloader); |
| 50 | |
| 51 | data = g_bytes_get_datacxx . . $ g_bytes_get_data(e1c692f77020eb9f). (bytes, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 52 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (memcmp (data, buffer, 4) == 0); |
| 53 | |
| 54 | g_bytes_unrefcxx . . $ g_bytes_unref(8fa06155751f251e). (bytes); |
| 55 | |
| 56 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (texture); |
| 57 | } |
| 58 | |
| 59 | int |
| 60 | maincxx . . $ main(afcd3168fc1188a4). (int argc, char *argv[]) |
| 61 | { |
| 62 | gtk_test_initcxx . . $ gtk_test_init(b91bcc5cc1349d78). (&argc, &argv, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 63 | |
| 64 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/dmabuf/no-gpu", test_dmabuf_no_gpucxx . . $ test_dmabuf_no_gpu(49f6e7a06ebc5aa8).); |
| 65 | |
| 66 | return g_test_runcxx . . $ g_test_run(b126dc7c1de90089). (); |
| 67 | } |