summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.hpp
diff options
context:
space:
mode:
authorUjinT34 <41110182+UjinT34@users.noreply.github.com>2026-02-26 15:01:59 +0300
committerGitHub <noreply@github.com>2026-02-26 12:01:59 +0000
commitc71fbd854dfdedaae011f4b8b1fdb81f8054b309 (patch)
tree89d600037ab206f800acca1b2567eb60af67c7e9 /src/helpers/Monitor.hpp
parent0e9196867b4f602e1e5a599d4f3565faff615b3c (diff)
renderer: better sdr eotf settings (#12812)
Diffstat (limited to 'src/helpers/Monitor.hpp')
-rw-r--r--src/helpers/Monitor.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index 37f3f16a..72e0cf66 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -23,6 +23,8 @@
#include <aquamarine/allocator/Swapchain.hpp>
#include <hyprutils/os/FileDescriptor.hpp>
+#include "../helpers/TransferFunction.hpp"
+
class CMonitorFrameScheduler;
// Enum for the different types of auto directions, e.g. auto-left, auto-up.
@@ -50,7 +52,7 @@ struct SMonitorRule {
std::string mirrorOf = "";
bool enable10bit = false;
NCMType::eCMType cmType = NCMType::CM_SRGB;
- int sdrEotf = 0;
+ NTransferFunction::eTF sdrEotf = NTransferFunction::TF_DEFAULT;
float sdrSaturation = 1.0f; // SDR -> HDR
float sdrBrightness = 1.0f; // SDR -> HDR
Desktop::CReservedArea reservedArea;
@@ -137,7 +139,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;
+ NTransferFunction::eTF m_sdrEotf = NTransferFunction::TF_DEFAULT;
float m_sdrSaturation = 1.0f;
float m_sdrBrightness = 1.0f;
float m_sdrMinLuminance = 0.2f;
@@ -284,7 +286,7 @@ class CMonitor {
// methods
void onConnect(bool noRule);
void onDisconnect(bool destroy = false);
- void applyCMType(NCMType::eCMType cmType, int cmSdrEotf);
+ void applyCMType(NCMType::eCMType cmType, NTransferFunction::eTF cmSdrEotf);
bool applyMonitorRule(SMonitorRule* pMonitorRule, bool force = false);
void addDamage(const pixman_region32_t* rg);
void addDamage(const CRegion& rg);