diff --git a/gdk/gdk.c b/gdk/gdk.c index d40c5ee4df..5bfc66e510 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -19,7 +19,7 @@ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #include "config.h" @@ -130,6 +130,7 @@ static const GdkDebugKey gdk_debug_keys[] = { { "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" }, { "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings", TRUE }, { "high-depth", GDK_DEBUG_HIGH_DEPTH, "Use high bit depth rendering if possible", TRUE }, + { "srgb", GDK_DEBUG_SRGB, "Force sRRGB rendering and turn off color profiles" }, }; diff --git a/gdk/gdkdebug.h b/gdk/gdkdebug.h index acd2259440..21a4064762 100644 --- a/gdk/gdkdebug.h +++ b/gdk/gdkdebug.h @@ -51,6 +51,7 @@ typedef enum { GDK_DEBUG_VULKAN_VALIDATE = 1 << 22, GDK_DEBUG_DEFAULT_SETTINGS= 1 << 23, GDK_DEBUG_HIGH_DEPTH = 1 << 24, + GDK_DEBUG_SRGB = 1 << 25, } GdkDebugFlags; extern guint _gdk_debug_flags; diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index de55fbcc5e..5841e11214 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2088,6 +2088,10 @@ void gdk_surface_set_color_profile (GdkSurface *self, GdkColorProfile *color_profile) { + /* This way we support unsetting, too */ + if (GDK_DISPLAY_DEBUG_CHECK (self->display, SRGB)) + color_profile = gdk_color_profile_get_srgb(); + if (gdk_color_profile_equal (self->color_profile, color_profile)) return;