rendernode-tool: Download in the texture's format

When downloading textures, download the in the actual format of the
texture. We don't want to benchmark conversion, we want to benchmark
renderers.
This commit is contained in:
Benjamin Otte 2024-09-14 19:33:39 +02:00
parent 376dbe9def
commit efd5395ecf

View File

@ -62,6 +62,8 @@ benchmark_node (GskRenderNode *node,
gsize stride; gsize stride;
downloader = gdk_texture_downloader_new (texture); downloader = gdk_texture_downloader_new (texture);
gdk_texture_downloader_set_format (downloader, gdk_texture_get_format (texture));
gdk_texture_downloader_set_color_state (downloader, gdk_texture_get_color_state (texture));
bytes = gdk_texture_downloader_download_bytes (downloader, &stride); bytes = gdk_texture_downloader_download_bytes (downloader, &stride);
g_bytes_unref (bytes); g_bytes_unref (bytes);
gdk_texture_downloader_free (downloader); gdk_texture_downloader_free (downloader);