[plasma/kwin/Plasma/6.7] 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 a3e7e71dca0c9c3008d6a309fe96d6e4f0d8ec75 by Xaver Hugl.
Committed on 22/07/2026 at 12:55.
Pushed by zamundaaa into branch 'Plasma/6.7'.

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


(cherry picked from commit 05df3e5199ec6f18386456df51d1675eed66da09)

Co-authored-by: Xaver Hugl <[email protected]>

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

https://invent.kde.org/plasma/kwin/-/commit/a3e7e71dca0c9c3008d6a309fe96d6e4f0d8ec75

diff --git a/src/backends/drm/drm_virtual_egl_layer.cpp b/src/backends/drm/drm_virtual_egl_layer.cpp
index 729c4d1f78a..0240ae5eb8f 100644
--- a/src/backends/drm/drm_virtual_egl_layer.cpp
+++ b/src/backends/drm/drm_virtual_egl_layer.cpp
@@ -39,7 +39,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.