backends/drm: disable the hardware cursor with color management

Blending needs to happen in linear space, which is not the case if the
inverse EOTF and VCGT are applied before blending
This commit is contained in:
Xaver Hugl 2023-10-06 22:59:52 +02:00
parent 4582276cf8
commit 6e05314739

View file

@ -47,6 +47,10 @@ EglGbmCursorLayer::EglGbmCursorLayer(EglGbmBackend *eglBackend, DrmPipeline *pip
std::optional<OutputLayerBeginFrameInfo> EglGbmCursorLayer::beginFrame()
{
if (m_pipeline->output()->needsColormanagement()) {
// TODO for hardware cursors to work with color management, KWin needs to offload post-blending color management steps to KMS
return std::nullopt;
}
return m_surface.startRendering(m_pipeline->gpu()->cursorSize(), drmToTextureRotation(m_pipeline) | TextureTransform::MirrorY, m_pipeline->cursorFormats(), m_pipeline->colorDescription(), m_pipeline->output()->channelFactors(), m_pipeline->output()->needsColormanagement());
}