summaryrefslogtreecommitdiff
path: root/src/protocols/DRMSyncobj.hpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-03-21 20:19:53 +0100
committerGitHub <noreply@github.com>2025-03-21 20:19:53 +0100
commitccbdba7ee2ccb835306de89a6023134fa6b8006f (patch)
treeb58e56658b1616752c21d1152ce239b9a75b0d53 /src/protocols/DRMSyncobj.hpp
parentc7f0519fafbf334a8f5088a8a0fc385732a24036 (diff)
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.
Diffstat (limited to 'src/protocols/DRMSyncobj.hpp')
-rw-r--r--src/protocols/DRMSyncobj.hpp13
1 files changed, 5 insertions, 8 deletions
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<CDRMSyncobjTimelineResource> resource_, uint64_t point_);
+ CDRMSyncPointState(SP<CSyncTimeline> timeline_, uint64_t point_);
~CDRMSyncPointState() = default;
const uint64_t& point();
- WP<CDRMSyncobjTimelineResource> resource();
WP<CSyncTimeline> timeline();
- bool expired();
Hyprutils::Memory::CUniquePointer<CSyncReleaser> createSyncRelease();
bool addWaiter(const std::function<void()>& waiter);
bool comitted();
@@ -31,11 +29,10 @@ class CDRMSyncPointState {
void signal();
private:
- WP<CDRMSyncobjTimelineResource> m_resource = {};
- uint64_t m_point = 0;
- WP<CSyncTimeline> m_timeline = {};
- bool m_acquireCommitted = false;
- bool m_releaseTaken = false;
+ SP<CSyncTimeline> m_timeline = {};
+ uint64_t m_point = 0;
+ bool m_acquireCommitted = false;
+ bool m_releaseTaken = false;
};
class CDRMSyncobjSurfaceResource {