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
This commit is contained in:
UjinT34 2025-02-26 17:56:37 +03:00 committed by GitHub
parent f0850905f0
commit 6787fe8933
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1561 additions and 276 deletions

View file

@ -76,6 +76,7 @@
using namespace Hyprutils::String;
using namespace Aquamarine;
using enum NContentType::eContentType;
using namespace NColorManagement;
static int handleCritSignal(int signo, void* data) {
Debug::log(LOG, "Hyprland received signal {}", signo);
@ -3029,8 +3030,10 @@ void CCompositor::onNewMonitor(SP<Aquamarine::IOutput> output) {
g_pHyprRenderer->damageMonitor(PNEWMONITOR);
PNEWMONITOR->onMonitorFrame();
if (PROTO::colorManagement && shouldChangePreferredImageDescription())
PROTO::colorManagement->onImagePreferredChanged();
if (PROTO::colorManagement && shouldChangePreferredImageDescription()) {
Debug::log(ERR, "FIXME: color management protocol is enabled, need a preferred image description id");
PROTO::colorManagement->onImagePreferredChanged(0);
}
}
SImageDescription CCompositor::getPreferredImageDescription() {