From 2ee5118d7a4a59d3ccfaed305bfc05c79cea7637 Mon Sep 17 00:00:00 2001 From: Ikalco <73481042+ikalco@users.noreply.github.com> Date: Wed, 30 Apr 2025 11:35:25 -0500 Subject: render: properly release rendered buffers (#9807) * cleanup eglSync * properly release buffers in renderer * add renderingDoneCallback and use it in screencopy * use static constructor for CEGLSync --- src/protocols/core/Compositor.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/protocols/core/Compositor.cpp') diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index 23b14dd3..cf28b240 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -7,7 +7,6 @@ #include "Subcompositor.hpp" #include "../Viewporter.hpp" #include "../../helpers/Monitor.hpp" -#include "../../helpers/sync/SyncReleaser.hpp" #include "../PresentationTime.hpp" #include "../DRMSyncobj.hpp" #include "../types/DMABuffer.hpp" @@ -518,8 +517,7 @@ void CWLSurfaceResource::commitState(SSurfaceState& state) { nullptr); } - // 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. + // release the buffer if it's synchronous (SHM) as updateSynchronousTexture() has copied the buffer data to a GPU tex // if it doesn't have a role, we can't release it yet, in case it gets turned into a cursor. if (current.buffer && current.buffer->isSynchronous() && role->role() != SURFACE_ROLE_UNASSIGNED) dropCurrentBuffer(); @@ -572,12 +570,6 @@ void CWLSurfaceResource::presentFeedback(const Time::steady_tp& when, PHLMONITOR else FEEDBACK->presented(); PROTO::presentation->queueData(FEEDBACK); - - if (!pMonitor || !pMonitor->inTimeline || !syncobj) - return; - - // attach explicit sync - g_pHyprRenderer->explicitPresented.emplace_back(self.lock()); } CWLCompositorResource::CWLCompositorResource(SP resource_) : resource(resource_) { -- cgit v1.2.3