diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2026-04-16 21:19:25 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-16 19:19:25 +0100 |
| commit | 66ea2e2c9ed4e9257521e6706fbd21feb7e3cc5b (patch) | |
| tree | 6c0c9842245917e9828874263cd11d6f556a0a48 /src/protocols | |
| parent | 4cce7f60a9c8772d18ffb43cb74aa227ab4b3bc4 (diff) | |
renderer: Various CM fixes, part 8 of refactors (#13860)
Part 8 of Ujin's refactors.
Diffstat (limited to 'src/protocols')
| -rw-r--r-- | src/protocols/ColorManagement.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/protocols/ColorManagement.cpp b/src/protocols/ColorManagement.cpp index bfab02e4..fce91691 100644 --- a/src/protocols/ColorManagement.cpp +++ b/src/protocols/ColorManagement.cpp @@ -266,7 +266,7 @@ CColorManagementSurface::CColorManagementSurface(SP<CWpColorManagementSurfaceV1> return; m_client = m_resource->client(); - m_imageDescription = DEFAULT_IMAGE_DESCRIPTION; + m_imageDescription = getDefaultImageDescription(); m_resource->setDestroy([this](CWpColorManagementSurfaceV1* r) { LOGM(Log::TRACE, "Destroy wp cm surface {}", (uintptr_t)m_surface); @@ -302,7 +302,7 @@ CColorManagementSurface::CColorManagementSurface(SP<CWpColorManagementSurfaceV1> }); m_resource->setUnsetImageDescription([this](CWpColorManagementSurfaceV1* r) { LOGM(Log::TRACE, "Unset image description for surface={}", (uintptr_t)r); - m_imageDescription = DEFAULT_IMAGE_DESCRIPTION; + m_imageDescription = getDefaultImageDescription(); setHasImageDescription(false); }); } @@ -316,8 +316,10 @@ wl_client* CColorManagementSurface::client() { } const SImageDescription& CColorManagementSurface::imageDescription() { - if (!hasImageDescription()) - LOGM(Log::WARN, "Reading imageDescription while none set. Returns default or empty values"); + if (!hasImageDescription()) { + LOGM(Log::TRACE, "Reading imageDescription while none set. Returns default or empty values"); + return getDefaultImageDescription()->value(); // JIC default settings change + } return m_imageDescription->value(); } |
