From ccbdba7ee2ccb835306de89a6023134fa6b8006f Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Fri, 21 Mar 2025 20:19:53 +0100 Subject: syncobj: refactor point timelines (#9689) no need to store the resource, just store the csynctimeline as a shared pointer and make the timeline own the syncobj fd. --- src/protocols/DRMSyncobj.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/protocols/DRMSyncobj.hpp') diff --git a/src/protocols/DRMSyncobj.hpp b/src/protocols/DRMSyncobj.hpp index 4d9c2ffc..d2259a34 100644 --- a/src/protocols/DRMSyncobj.hpp +++ b/src/protocols/DRMSyncobj.hpp @@ -17,13 +17,11 @@ struct SSurfaceState; class CDRMSyncPointState { public: CDRMSyncPointState() = default; - CDRMSyncPointState(WP resource_, uint64_t point_); + CDRMSyncPointState(SP timeline_, uint64_t point_); ~CDRMSyncPointState() = default; const uint64_t& point(); - WP resource(); WP timeline(); - bool expired(); Hyprutils::Memory::CUniquePointer createSyncRelease(); bool addWaiter(const std::function& waiter); bool comitted(); @@ -31,11 +29,10 @@ class CDRMSyncPointState { void signal(); private: - WP m_resource = {}; - uint64_t m_point = 0; - WP m_timeline = {}; - bool m_acquireCommitted = false; - bool m_releaseTaken = false; + SP m_timeline = {}; + uint64_t m_point = 0; + bool m_acquireCommitted = false; + bool m_releaseTaken = false; }; class CDRMSyncobjSurfaceResource { -- cgit v1.2.3