From dc72259a5443116e892c49e37552ca5f82525ca6 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 6 Oct 2025 23:44:47 +0100 Subject: core/compositor: revert make wl_surface::frame follow pending states (#11896) This reverts commit 17e77e0407bebd5d24521012ee1d04b156d6b9f4. Reverted due to severe performance degradation due to accumulating frame callbacks --- src/protocols/core/Compositor.hpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/protocols/core/Compositor.hpp') diff --git a/src/protocols/core/Compositor.hpp b/src/protocols/core/Compositor.hpp index dc61917d..0eff3f08 100644 --- a/src/protocols/core/Compositor.hpp +++ b/src/protocols/core/Compositor.hpp @@ -35,21 +35,13 @@ class CContentType; class CWLCallbackResource { public: - CWLCallbackResource(SP&& resource_); - ~CWLCallbackResource() noexcept = default; - // disable copy - CWLCallbackResource(const CWLCallbackResource&) = delete; - CWLCallbackResource& operator=(const CWLCallbackResource&) = delete; + CWLCallbackResource(UP&& resource_); - // allow move - CWLCallbackResource(CWLCallbackResource&&) noexcept = default; - CWLCallbackResource& operator=(CWLCallbackResource&&) noexcept = default; - - bool good(); - void send(const Time::steady_tp& now); + bool good(); + void send(const Time::steady_tp& now); private: - SP m_resource; + UP m_resource; }; class CWLRegionResource { @@ -102,8 +94,8 @@ class CWLSurfaceResource { SSurfaceState m_current; SSurfaceState m_pending; std::queue> m_pendingStates; - bool m_pendingWaiting = false; + std::vector> m_callbacks; WP m_self; WP m_hlSurface; std::vector m_enteredOutputs; @@ -118,7 +110,6 @@ class CWLSurfaceResource { SP findFirstPreorder(std::function)> fn); SP findWithCM(); void presentFeedback(const Time::steady_tp& when, PHLMONITOR pMonitor, bool discarded = false); - void scheduleState(WP state); void commitState(SSurfaceState& state); NColorManagement::SImageDescription getPreferredImageDescription(); void sortSubsurfaces(); -- cgit v1.2.3