From 458ea6dc5ef02b591a149becd93786f203cf6a43 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 29 Oct 2020 23:33:24 +0200 Subject: [PATCH] platforms/wayland: Enable buffer age for all outputs --- plugins/platforms/wayland/egl_wayland_backend.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/plugins/platforms/wayland/egl_wayland_backend.cpp b/plugins/platforms/wayland/egl_wayland_backend.cpp index 0d0c9b7b8e..b46b18decf 100644 --- a/plugins/platforms/wayland/egl_wayland_backend.cpp +++ b/plugins/platforms/wayland/egl_wayland_backend.cpp @@ -400,7 +400,7 @@ void EglWaylandBackend::endRenderingFrameForScreen(int screenId, const QRegion & { EglWaylandOutput *output = m_outputs[screenId]; QRegion damage = damagedRegion.intersected(output->m_waylandOutput->geometry()); - if (damage.isEmpty() && screenId == 0) { + if (damage.isEmpty()) { // If the damaged region of a window is fully occluded, the only // rendering done, if any, will have been to repair a reused back @@ -413,17 +413,12 @@ void EglWaylandBackend::endRenderingFrameForScreen(int screenId, const QRegion & glFlush(); } - for (auto *o : qAsConst(m_outputs)) { - o->m_bufferAge = 1; - } + output->m_bufferAge = 1; return; } presentOnSurface(output, damage); - // Save the damaged region to history - // Note: damage history is only collected for the first screen. See EglGbmBackend - // for mor information regarding this limitation. - if (supportsBufferAge() && screenId == 0) { + if (supportsBufferAge()) { if (output->m_damageHistory.count() > 10) { output->m_damageHistory.removeLast(); }