protocols: Remove incorrect CM proto debug check and fix preferred image description (#11023)
This commit is contained in:
parent
06fcdbd9c7
commit
bc764f7065
3 changed files with 18 additions and 4 deletions
|
|
@ -362,6 +362,11 @@ CColorManagementFeedbackSurface::CColorManagementFeedbackSurface(SP<CWpColorMana
|
|||
m_resource->setGetPreferred([this](CWpColorManagementSurfaceFeedbackV1* r, uint32_t id) {
|
||||
LOGM(TRACE, "Get preferred for id {}", id);
|
||||
|
||||
if (m_surface.expired()) {
|
||||
r->error(WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_INERT, "Surface is inert");
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_currentPreferred.valid())
|
||||
PROTO::colorManagement->destroyResource(m_currentPreferred.get());
|
||||
|
||||
|
|
@ -377,15 +382,15 @@ CColorManagementFeedbackSurface::CColorManagementFeedbackSurface(SP<CWpColorMana
|
|||
RESOURCE->m_self = RESOURCE;
|
||||
m_currentPreferred = RESOURCE;
|
||||
|
||||
m_currentPreferred->m_settings = g_pCompositor->getPreferredImageDescription();
|
||||
m_currentPreferred->m_settings = m_surface->getPreferredImageDescription();
|
||||
RESOURCE->resource()->sendReady(m_currentPreferred->m_settings.updateId());
|
||||
});
|
||||
|
||||
m_resource->setGetPreferredParametric([this](CWpColorManagementSurfaceFeedbackV1* r, uint32_t id) {
|
||||
LOGM(TRACE, "Get preferred for id {}", id);
|
||||
|
||||
if (!PROTO::colorManagement->m_debug) {
|
||||
r->error(WP_COLOR_MANAGER_V1_ERROR_UNSUPPORTED_FEATURE, "Parametric descriptions are not supported");
|
||||
if (m_surface.expired()) {
|
||||
r->error(WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_ERROR_INERT, "Surface is inert");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -404,7 +409,7 @@ CColorManagementFeedbackSurface::CColorManagementFeedbackSurface(SP<CWpColorMana
|
|||
RESOURCE->m_self = RESOURCE;
|
||||
m_currentPreferred = RESOURCE;
|
||||
|
||||
m_currentPreferred->m_settings = g_pCompositor->getPreferredImageDescription();
|
||||
m_currentPreferred->m_settings = m_surface->getPreferredImageDescription();
|
||||
if (!PROTO::colorManagement->m_debug && m_currentPreferred->m_settings.icc.fd) {
|
||||
LOGM(ERR, "FIXME: parse icc profile");
|
||||
r->error(WP_COLOR_MANAGER_V1_ERROR_UNSUPPORTED_FEATURE, "ICC profiles are not supported");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue