mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 02:10:10 +00:00
gdk: Add GDK_N_DEPTHS to the enum
We are indexing arrays by the number of depths, and when adding depths we don't want to forget to grow those arrays.
This commit is contained in:
parent
a35f9102f2
commit
33d87bc22e
@ -1479,6 +1479,7 @@ gdk_memory_depth_merge (GdkMemoryDepth depth1,
|
||||
else
|
||||
return GDK_MEMORY_FLOAT32;
|
||||
|
||||
case GDK_N_DEPTHS:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return GDK_MEMORY_U8;
|
||||
@ -1507,6 +1508,7 @@ gdk_memory_depth_get_format (GdkMemoryDepth depth)
|
||||
return GDK_MEMORY_R16G16B16A16_FLOAT_PREMULTIPLIED;
|
||||
case GDK_MEMORY_FLOAT32:
|
||||
return GDK_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED;
|
||||
case GDK_N_DEPTHS:
|
||||
default:
|
||||
g_return_val_if_reached (GDK_MEMORY_R8G8B8A8_PREMULTIPLIED);
|
||||
}
|
||||
@ -1534,6 +1536,7 @@ gdk_memory_depth_get_alpha_format (GdkMemoryDepth depth)
|
||||
return GDK_MEMORY_A16_FLOAT;
|
||||
case GDK_MEMORY_FLOAT32:
|
||||
return GDK_MEMORY_A32_FLOAT;
|
||||
case GDK_N_DEPTHS:
|
||||
default:
|
||||
g_return_val_if_reached (GDK_MEMORY_A8);
|
||||
}
|
||||
|
@ -40,7 +40,9 @@ typedef enum {
|
||||
GDK_MEMORY_U8,
|
||||
GDK_MEMORY_U16,
|
||||
GDK_MEMORY_FLOAT16,
|
||||
GDK_MEMORY_FLOAT32
|
||||
GDK_MEMORY_FLOAT32,
|
||||
|
||||
GDK_N_DEPTHS
|
||||
} GdkMemoryDepth;
|
||||
|
||||
gsize gdk_memory_format_alignment (GdkMemoryFormat format) G_GNUC_CONST;
|
||||
|
@ -72,7 +72,7 @@ struct _GdkVulkanContextPrivate {
|
||||
struct {
|
||||
VkSurfaceFormatKHR vk_format;
|
||||
GdkMemoryFormat gdk_format;
|
||||
} formats[4];
|
||||
} formats[GDK_N_DEPTHS];
|
||||
GdkMemoryDepth current_depth;
|
||||
|
||||
VkSwapchainKHR swapchain;
|
||||
|
@ -3614,6 +3614,7 @@ append_texture_param (Printer *p,
|
||||
g_string_append (p->str, "url(\"data:image/tiff;base64,\\\n");
|
||||
break;
|
||||
|
||||
case GDK_N_DEPTHS:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user