diff --git a/gsk/gskvulkanimage.c b/gsk/gskvulkanimage.c index edfb24a678..279d7bb147 100644 --- a/gsk/gskvulkanimage.c +++ b/gsk/gskvulkanimage.c @@ -316,16 +316,10 @@ gsk_vulkan_image_new_from_data (GdkVulkanContext *context, gsize height, gsize stride) { - switch (GSK_VULKAN_UPLOAD_IMAGE_DEFAULT) - { - default: - g_assert_not_reached (); - /* fall through */ - case GSK_VULKAN_UPLOAD_DIRECTLY: - return gsk_vulkan_image_new_from_data_directly (context, command_buffer, data, width, height, stride); - case GSK_VULKAN_UPLOAD_VIA_STAGING_IMAGE: - return gsk_vulkan_image_new_from_data_via_staging_image (context, command_buffer, data, width, height, stride); - } + if (GSK_RENDER_MODE_CHECK (STAGING_IMAGE)) + return gsk_vulkan_image_new_from_data_via_staging_image (context, command_buffer, data, width, height, stride); + else + return gsk_vulkan_image_new_from_data_directly (context, command_buffer, data, width, height, stride); } void diff --git a/gsk/gskvulkanimageprivate.h b/gsk/gskvulkanimageprivate.h index 7c089c2b7b..57686eac04 100644 --- a/gsk/gskvulkanimageprivate.h +++ b/gsk/gskvulkanimageprivate.h @@ -5,14 +5,6 @@ G_BEGIN_DECLS -/* Modify here for benchmarking */ -#define GSK_VULKAN_UPLOAD_IMAGE_DEFAULT GSK_VULKAN_UPLOAD_DIRECTLY - -typedef enum { - GSK_VULKAN_UPLOAD_DIRECTLY, - GSK_VULKAN_UPLOAD_VIA_STAGING_IMAGE -} GstkVulkanImageUpload; - typedef struct _GskVulkanImage GskVulkanImage; GskVulkanImage * gsk_vulkan_image_new_from_data (GdkVulkanContext *context,