From bcb96c553214d0938289c0fc7d79de82629ccf18 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Thu, 10 Jul 2025 13:09:19 +0200 Subject: presentation: move to unique ptrs less refcounting, move by rvalue. --- src/protocols/PresentationTime.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/protocols/PresentationTime.hpp') diff --git a/src/protocols/PresentationTime.hpp b/src/protocols/PresentationTime.hpp index a7b13a77..c348c175 100644 --- a/src/protocols/PresentationTime.hpp +++ b/src/protocols/PresentationTime.hpp @@ -33,14 +33,14 @@ class CQueuedPresentationData { class CPresentationFeedback { public: - CPresentationFeedback(SP resource_, SP surf); + CPresentationFeedback(UP&& resource_, SP surf); bool good(); - void sendQueued(SP data, const Time::steady_tp& when, uint32_t untilRefreshNs, uint64_t seq, uint32_t reportedFlags); + void sendQueued(WP data, const Time::steady_tp& when, uint32_t untilRefreshNs, uint64_t seq, uint32_t reportedFlags); private: - SP m_resource; + UP m_resource; WP m_surface; bool m_done = false; @@ -54,7 +54,7 @@ class CPresentationProtocol : public IWaylandProtocol { virtual void bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id); void onPresented(PHLMONITOR pMonitor, const Time::steady_tp& when, uint32_t untilRefreshNs, uint64_t seq, uint32_t reportedFlags); - void queueData(SP data); + void queueData(UP&& data); private: void onManagerResourceDestroy(wl_resource* res); @@ -63,8 +63,8 @@ class CPresentationProtocol : public IWaylandProtocol { // std::vector> m_managers; - std::vector> m_feedbacks; - std::vector> m_queue; + std::vector> m_feedbacks; + std::vector> m_queue; friend class CPresentationFeedback; }; -- cgit v1.2.3