From ff50dc36e912b6ad764802d51be838bc7f6ed323 Mon Sep 17 00:00:00 2001 From: Dominick DiMaggio Date: Wed, 29 Oct 2025 08:53:42 -0400 Subject: renderer/cm: allow gamma 2.2 instead of sRGB EOTF (#12094) --- src/helpers/Monitor.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/helpers/Monitor.hpp') diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index ff697725..ba8c449e 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -48,6 +48,7 @@ struct SMonitorRule { std::string mirrorOf = ""; bool enable10bit = false; NCMType::eCMType cmType = NCMType::CM_SRGB; + int sdrEotf = 0; float sdrSaturation = 1.0f; // SDR -> HDR float sdrBrightness = 1.0f; // SDR -> HDR @@ -132,6 +133,7 @@ class CMonitor { bool m_vrrActive = false; // this can be TRUE even if VRR is not active in the case that this display does not support it. bool m_enabled10bit = false; // as above, this can be TRUE even if 10 bit failed. NCMType::eCMType m_cmType = NCMType::CM_SRGB; + int m_sdrEotf = 0; float m_sdrSaturation = 1.0f; float m_sdrBrightness = 1.0f; float m_sdrMinLuminance = 0.2f; @@ -275,7 +277,7 @@ class CMonitor { // methods void onConnect(bool noRule); void onDisconnect(bool destroy = false); - void applyCMType(NCMType::eCMType cmType); + void applyCMType(NCMType::eCMType cmType, int cmSdrEotf); bool applyMonitorRule(SMonitorRule* pMonitorRule, bool force = false); void addDamage(const pixman_region32_t* rg); void addDamage(const CRegion& rg); -- cgit v1.2.3