Replace HDR debug toggle with o.g.M.DisplayConfig API

HDR being enabled was controlled by toggling a property on
org.gnome.Mutter.DebugControl, which affected how the color space and
HDR metadata of the output was configured. Replace this with a higher
level MetaMonitor / MetaOutput level "color mode" enum, that is also
reflected in the monitor configuration API.

This enum is then used to derive the color space and HDR metadata at the
lower level where it matters. The ForceHDR debug control property is
still left there, as it only affects the color space and transfer
function of the view related to a monitor.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192>
This commit is contained in:
Jonas Ådahl
2024-12-13 10:52:33 +01:00
committed by Marge Bot
parent 2fa0183a95
commit d855623fb4
20 changed files with 349 additions and 450 deletions

View File

@ -318,17 +318,10 @@ size_t meta_monitor_get_gamma_lut_size (MetaMonitor *monitor);
void meta_monitor_set_gamma_lut (MetaMonitor *monitor,
const MetaGammaLut *lut);
MetaOutputColorspace meta_monitor_get_color_space (MetaMonitor *monitor);
MetaColorMode meta_monitor_get_color_mode (MetaMonitor *monitor);
gboolean meta_monitor_set_color_space (MetaMonitor *monitor,
MetaOutputColorspace color_space,
GError **error);
MetaOutputHdrMetadata * meta_monitor_get_hdr_metadata (MetaMonitor *monitor);
gboolean meta_monitor_set_hdr_metadata (MetaMonitor *monitor,
MetaOutputHdrMetadata *metadata,
GError **error);
META_EXPORT_TEST
GList * meta_monitor_get_supported_color_modes (MetaMonitor *monitor);
META_EXPORT_TEST
gboolean meta_parse_monitor_mode (const char *string,
@ -355,6 +348,4 @@ void meta_monitor_set_for_lease (MetaMonitor *monitor,
META_EXPORT_TEST
gboolean meta_monitor_is_for_lease (MetaMonitor *monitor);
GList * meta_monitor_get_supported_color_modes (MetaMonitor *monitor);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorSpec, meta_monitor_spec_free)