color-device: Set the color state to BT2020+PQ when HDR is forced
Sets the color state of all monitors to BT2020+PQ even if the monitor isn't accpeting such a signal. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4035>
This commit is contained in:
parent
2f3ad4be5c
commit
245dafe811
@ -697,6 +697,13 @@ update_color_state (MetaColorDevice *color_device)
|
|||||||
colorspace = get_color_space_from_monitor (monitor);
|
colorspace = get_color_space_from_monitor (monitor);
|
||||||
eotf = get_eotf_from_monitor (monitor);
|
eotf = get_eotf_from_monitor (monitor);
|
||||||
|
|
||||||
|
if (meta_debug_control_is_hdr_forced (debug_control))
|
||||||
|
{
|
||||||
|
colorspace = CLUTTER_COLORSPACE_BT2020;
|
||||||
|
eotf.type = CLUTTER_EOTF_TYPE_NAMED;
|
||||||
|
eotf.tf_name = CLUTTER_TRANSFER_FUNCTION_PQ;
|
||||||
|
}
|
||||||
|
|
||||||
luminance = clutter_eotf_get_default_luminance (eotf);
|
luminance = clutter_eotf_get_default_luminance (eotf);
|
||||||
|
|
||||||
reference_luminance_factor =
|
reference_luminance_factor =
|
||||||
|
@ -1288,6 +1288,10 @@ on_started (MetaContext *context,
|
|||||||
G_CALLBACK (meta_monitor_manager_reconfigure),
|
G_CALLBACK (meta_monitor_manager_reconfigure),
|
||||||
monitor_manager, NULL,
|
monitor_manager, NULL,
|
||||||
G_CONNECT_SWAPPED | G_CONNECT_AFTER);
|
G_CONNECT_SWAPPED | G_CONNECT_AFTER);
|
||||||
|
g_signal_connect_data (debug_control, "notify::force-hdr",
|
||||||
|
G_CALLBACK (meta_monitor_manager_reconfigure),
|
||||||
|
monitor_manager, NULL,
|
||||||
|
G_CONNECT_SWAPPED | G_CONNECT_AFTER);
|
||||||
g_signal_connect_data (debug_control, "notify::force-linear-blending",
|
g_signal_connect_data (debug_control, "notify::force-linear-blending",
|
||||||
G_CALLBACK (meta_monitor_manager_reconfigure),
|
G_CALLBACK (meta_monitor_manager_reconfigure),
|
||||||
monitor_manager, NULL,
|
monitor_manager, NULL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user