From ccf5623f34b84ef0e272e4306201fa2476a189d0 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 20 Dec 2022 17:46:09 +0200 Subject: [PATCH] backends/wayland: Flush rendering commands in endFrame() eglSwapBuffers() used to flush rendering commands but now that we render to dmabufs, we need somehow to flush the rendering commands to the dmabuf. It fixes some of the weird rendering issues that I see sometimes. --- src/backends/wayland/wayland_egl_backend.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/wayland/wayland_egl_backend.cpp b/src/backends/wayland/wayland_egl_backend.cpp index b193aa9e0a..c0e131799e 100644 --- a/src/backends/wayland/wayland_egl_backend.cpp +++ b/src/backends/wayland/wayland_egl_backend.cpp @@ -205,6 +205,9 @@ std::optional WaylandEglPrimaryLayer::beginFrame() bool WaylandEglPrimaryLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion) { + // Flush rendering commands to the dmabuf. + glFlush(); + m_damageJournal.add(damagedRegion); return true; }