From ac60e358189782ffe71348b1175532810546b128 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 19 Jun 2021 10:35:30 +0300 Subject: [PATCH] Don't flush client connection when sending frame callbacks This way, the compositor can batch more frame callbacks before flushing the client connection. We attempted this before, but it broke tests. Now, it seems like the tests pass, so we can remove the manual flush. --- src/wayland/surface_interface.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index 4adf086007..27b48fc8b0 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -404,7 +404,6 @@ QList SurfaceInterface::surfaces() void SurfaceInterface::frameRendered(quint32 msec) { // notify all callbacks - const bool needsFlush = !d->current.frameCallbacks.isEmpty(); while (!d->current.frameCallbacks.isEmpty()) { KWaylandFrameCallback *frameCallback = d->current.frameCallbacks.takeFirst(); frameCallback->send_done(msec); @@ -413,9 +412,6 @@ void SurfaceInterface::frameRendered(quint32 msec) for (auto it = d->current.children.constBegin(); it != d->current.children.constEnd(); ++it) { (*it)->surface()->frameRendered(msec); } - if (needsFlush) { - client()->flush(); - } } bool SurfaceInterface::hasFrameCallbacks() const