From 6787fe8933b54f9e68f123df457e502dee9be13a Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Wed, 26 Feb 2025 17:56:37 +0300 Subject: protocols: Support wp color management proto (#9444) Adds support for the recently merged w-p CM protocol alongside the (now deprecated) old CM WIP protocols --- src/helpers/Monitor.hpp | 66 +++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 32 deletions(-) (limited to 'src/helpers') diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index 690b8c4a..5a58fc06 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -12,6 +12,7 @@ #include "Timer.hpp" #include "math/Math.hpp" #include +#include "protocols/types/ColorManagement.hpp" #include "signal/Signal.hpp" #include "DamageRing.hpp" #include @@ -162,38 +163,39 @@ class CMonitor { std::array, 4> m_aLayerSurfaceLayers; // methods - void onConnect(bool noRule); - void onDisconnect(bool destroy = false); - bool applyMonitorRule(SMonitorRule* pMonitorRule, bool force = false); - void addDamage(const pixman_region32_t* rg); - void addDamage(const CRegion& rg); - void addDamage(const CBox& box); - bool shouldSkipScheduleFrameOnMouseEvent(); - void setMirror(const std::string&); - bool isMirror(); - bool matchesStaticSelector(const std::string& selector) const; - float getDefaultScale(); - void changeWorkspace(const PHLWORKSPACE& pWorkspace, bool internal = false, bool noMouseMove = false, bool noFocus = false); - void changeWorkspace(const WORKSPACEID& id, bool internal = false, bool noMouseMove = false, bool noFocus = false); - void setSpecialWorkspace(const PHLWORKSPACE& pWorkspace); - void setSpecialWorkspace(const WORKSPACEID& id); - void moveTo(const Vector2D& pos); - Vector2D middle(); - void updateMatrix(); - WORKSPACEID activeWorkspaceID(); - WORKSPACEID activeSpecialWorkspaceID(); - CBox logicalBox(); - void scheduleDone(); - bool attemptDirectScanout(); - void setCTM(const Mat3x3& ctm); - void onCursorMovedOnMonitor(); - - void debugLastPresentation(const std::string& message); - void onMonitorFrame(); - - bool m_bEnabled = false; - bool m_bRenderingInitPassed = false; - WP m_previousFSWindow; + void onConnect(bool noRule); + void onDisconnect(bool destroy = false); + bool applyMonitorRule(SMonitorRule* pMonitorRule, bool force = false); + void addDamage(const pixman_region32_t* rg); + void addDamage(const CRegion& rg); + void addDamage(const CBox& box); + bool shouldSkipScheduleFrameOnMouseEvent(); + void setMirror(const std::string&); + bool isMirror(); + bool matchesStaticSelector(const std::string& selector) const; + float getDefaultScale(); + void changeWorkspace(const PHLWORKSPACE& pWorkspace, bool internal = false, bool noMouseMove = false, bool noFocus = false); + void changeWorkspace(const WORKSPACEID& id, bool internal = false, bool noMouseMove = false, bool noFocus = false); + void setSpecialWorkspace(const PHLWORKSPACE& pWorkspace); + void setSpecialWorkspace(const WORKSPACEID& id); + void moveTo(const Vector2D& pos); + Vector2D middle(); + void updateMatrix(); + WORKSPACEID activeWorkspaceID(); + WORKSPACEID activeSpecialWorkspaceID(); + CBox logicalBox(); + void scheduleDone(); + bool attemptDirectScanout(); + void setCTM(const Mat3x3& ctm); + void onCursorMovedOnMonitor(); + + void debugLastPresentation(const std::string& message); + void onMonitorFrame(); + + bool m_bEnabled = false; + bool m_bRenderingInitPassed = false; + WP m_previousFSWindow; + NColorManagement::SImageDescription imageDescription; // For the list lookup -- cgit v1.2.3