Add GDK_DISABLE=color-mgmt

This flag is meant to turn off color management features of GDK.
If this is set, all surfaces will report sRGB as their preferred
color state.
This commit is contained in:
Matthias Clasen
2024-08-19 16:04:15 -04:00
parent 2d230f79a6
commit de62ea96ab
3 changed files with 6 additions and 1 deletions

View File

@@ -358,6 +358,9 @@ disable certain features.
`offload`
: Disable graphics offload to subsurfaces
`color-mgmt`
: Disable color management
### `GDK_GL_DISABLE`
This variable can be set to a list of values, which cause GDK to

View File

@@ -151,6 +151,7 @@ static const GdkDebugKey gdk_feature_keys[] = {
{ "vulkan", GDK_FEATURE_VULKAN, "Disable Vulkan support" },
{ "dmabuf", GDK_FEATURE_DMABUF, "Disable dmabuf support" },
{ "offload", GDK_FEATURE_OFFLOAD, "Disable graphics offload" },
{ "color-mgmt", GDK_FEATURE_COLOR_MANAGEMENT, "Disable color management" },
};

View File

@@ -63,9 +63,10 @@ typedef enum {
GDK_FEATURE_VULKAN = 1 << 6,
GDK_FEATURE_DMABUF = 1 << 7,
GDK_FEATURE_OFFLOAD = 1 << 8,
GDK_FEATURE_COLOR_MANAGEMENT = 1 << 9,
} GdkFeatures;
#define GDK_ALL_FEATURES ((1 << 9) - 1)
#define GDK_ALL_FEATURES ((1 << 10) - 1)
extern guint _gdk_debug_flags;