From bcba59a7f511d384a5e3408a97b03a33f8bc5a4f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 9 Dec 2023 18:40:45 +0200 Subject: [PATCH] scene: Use hardware clipping when painting overlay items It's needed to properly render transformed overlay items. Ideally, the ItemRenderer would split items that can be rendered with and without the scissor test on its own. But we are not there yet, so pass the PAINT_SCREEN_TRANSFORMED flag to force the ItemRendererOpenGL to use hardware clipping. --- src/scene/workspacescene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scene/workspacescene.cpp b/src/scene/workspacescene.cpp index c2b3d14f2a..671ed747d7 100644 --- a/src/scene/workspacescene.cpp +++ b/src/scene/workspacescene.cpp @@ -382,7 +382,7 @@ void WorkspaceScene::paint(const RenderTarget &renderTarget, const QRegion ®i if (m_overlayItem) { const QRegion repaint = region & m_overlayItem->mapToScene(m_overlayItem->boundingRect()).toRect(); if (!repaint.isEmpty()) { - m_renderer->renderItem(renderTarget, viewport, m_overlayItem.get(), 0, repaint, WindowPaintData{}); + m_renderer->renderItem(renderTarget, viewport, m_overlayItem.get(), PAINT_SCREEN_TRANSFORMED, repaint, WindowPaintData{}); } }