mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
color_state: Make U8_SRGB the depth for COLOR_STATE_SRGB
This will only be used with linear compositing, so we force U8 when we're not compositing linear.
This commit is contained in:
parent
a7ceb8ce66
commit
127b92e3db
@ -162,7 +162,7 @@ GdkDefaultColorState gdk_default_color_states[] = {
|
||||
.parent = {
|
||||
.klass = &GDK_DEFAULT_COLOR_STATE_CLASS,
|
||||
.ref_count = 0,
|
||||
.depth = GDK_MEMORY_U8,
|
||||
.depth = GDK_MEMORY_U8_SRGB,
|
||||
.rendering_color_state = GDK_COLOR_STATE_SRGB_LINEAR,
|
||||
},
|
||||
.name = "srgb",
|
||||
|
@ -67,6 +67,9 @@ gdk_color_state_get_rendering_color_state (GdkColorState *self)
|
||||
static inline GdkMemoryDepth
|
||||
gdk_color_state_get_depth (GdkColorState *self)
|
||||
{
|
||||
if (!GDK_DEBUG_CHECK (LINEAR) && self->depth == GDK_MEMORY_U8_SRGB)
|
||||
return GDK_MEMORY_U8;
|
||||
|
||||
return self->depth;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user