From f6ca4bac51595555916f7403ae178680791f824c Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Thu, 20 Mar 2025 11:39:55 +0100 Subject: syncobj: restore SHM buffer reset (#9675) reset shm buffers early to mitigate stuttering animations, also reuse the monitors eglSync and store the eglsync per monitor. this however reintroduces flickering in dbeaver nonsyncobj application. --- src/protocols/core/Compositor.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/protocols/core/Compositor.cpp') diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index a9fe33db..a3576c7e 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -471,12 +471,10 @@ void CWLSurfaceResource::commitPendingState(SSurfaceState& state) { nullptr); } - // release the buffer if it's synchronous as update() has done everything thats needed + // release the buffer if it's synchronous (SHM) as update() has done everything thats needed // so we can let the app know we're done. - // if (!syncobj && current.buffer && current.buffer->buffer && current.buffer->buffer->isSynchronous()) { - // dropCurrentBuffer(); // lets not drop it at all, it will get dropped on next commit if a new buffer arrives. - // solves flickering on nonsyncobj apps on explicit sync. - // } + if (current.buffer && current.buffer->buffer && current.buffer->buffer->isSynchronous()) + dropCurrentBuffer(); } void CWLSurfaceResource::updateCursorShm(CRegion damage) { -- cgit v1.2.3