From 91bef430bf780b8b3d8011c453b5d906fdee0abc Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 10 Jan 2023 14:58:57 +0200 Subject: [PATCH] backends/virtual: Move glFlush() to endFrame() It makes more sense in endFrame() rather than present(). --- src/backends/virtual/virtual_egl_backend.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backends/virtual/virtual_egl_backend.cpp b/src/backends/virtual/virtual_egl_backend.cpp index 7c882caaa8..1215f6ff03 100644 --- a/src/backends/virtual/virtual_egl_backend.cpp +++ b/src/backends/virtual/virtual_egl_backend.cpp @@ -56,6 +56,7 @@ std::optional VirtualEglLayer::beginFrame() bool VirtualEglLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion) { + glFlush(); // flush pending rendering commands. return true; } @@ -198,8 +199,6 @@ OutputLayer *VirtualEglBackend::primaryLayer(Output *output) void VirtualEglBackend::present(Output *output) { - glFlush(); - static_cast(output)->vsyncMonitor()->arm(); }