diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-10-06 23:44:47 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-10-06 23:44:47 +0100 |
| commit | dc72259a5443116e892c49e37552ca5f82525ca6 (patch) | |
| tree | a5a5b41ea5111564eba17a6b1262352550f53857 /src/protocols/core/Compositor.hpp | |
| parent | 02cda6bebf327e85c8b238961ce0514a66b92709 (diff) | |
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
Diffstat (limited to 'src/protocols/core/Compositor.hpp')
| -rw-r--r-- | src/protocols/core/Compositor.hpp | 19 |
1 files changed, 5 insertions, 14 deletions
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<CWlCallback>&& resource_); - ~CWLCallbackResource() noexcept = default; - // disable copy - CWLCallbackResource(const CWLCallbackResource&) = delete; - CWLCallbackResource& operator=(const CWLCallbackResource&) = delete; + CWLCallbackResource(UP<CWlCallback>&& 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<CWlCallback> m_resource; + UP<CWlCallback> m_resource; }; class CWLRegionResource { @@ -102,8 +94,8 @@ class CWLSurfaceResource { SSurfaceState m_current; SSurfaceState m_pending; std::queue<UP<SSurfaceState>> m_pendingStates; - bool m_pendingWaiting = false; + std::vector<UP<CWLCallbackResource>> m_callbacks; WP<CWLSurfaceResource> m_self; WP<CWLSurface> m_hlSurface; std::vector<PHLMONITORREF> m_enteredOutputs; @@ -118,7 +110,6 @@ class CWLSurfaceResource { SP<CWLSurfaceResource> findFirstPreorder(std::function<bool(SP<CWLSurfaceResource>)> fn); SP<CWLSurfaceResource> findWithCM(); void presentFeedback(const Time::steady_tp& when, PHLMONITOR pMonitor, bool discarded = false); - void scheduleState(WP<SSurfaceState> state); void commitState(SSurfaceState& state); NColorManagement::SImageDescription getPreferredImageDescription(); void sortSubsurfaces(); |
