[plasma/kwin] src/backends/drm: backends/drm: release the scanout buffer of virtual layers in beginFrame

Xaver Hugl <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 05df3e5199ec6f18386456df51d1675eed66da09 by Xaver Hugl.
Committed on 22/07/2026 at 11:01.
Pushed by zamundaaa into branch 'master'.

backends/drm: release the scanout buffer of virtual layers in beginFrame

Otherwise we just keep the client buffer until the next scanout cycle, which is
quite broken.

BUG: 523353

M  +2    -1    src/backends/drm/drm_virtual_egl_layer.cpp

https://invent.kde.org/plasma/kwin/-/commit/05df3e5199ec6f18386456df51d1675eed66da09

diff --git a/src/backends/drm/drm_virtual_egl_layer.cpp b/src/backends/drm/drm_virtual_egl_layer.cpp
index c2ca5980e49..7837f58ea80 100644
--- a/src/backends/drm/drm_virtual_egl_layer.cpp
+++ b/src/backends/drm/drm_virtual_egl_layer.cpp
@@ -40,7 +40,8 @@ VirtualEglGbmLayer::~VirtualEglGbmLayer()
 
 std::optional<OutputLayerBeginFrameInfo> VirtualEglGbmLayer::doBeginFrame()
 {
-    // gbm surface
+    m_scanoutBuffer.reset();
+
     if (doesGbmSwapchainFit(m_gbmSwapchain.get())) {
         m_oldGbmSwapchain.reset();
         m_oldDamageJournal.clear();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.