presentation: move to unique ptrs

less refcounting, move by rvalue.
This commit is contained in:
Tom Englund 2025-07-10 13:09:19 +02:00 committed by Vaxry
parent f22b5971d1
commit bcb96c5532
5 changed files with 35 additions and 26 deletions

View file

@ -575,13 +575,13 @@ void CWLSurfaceResource::updateCursorShm(CRegion damage) {
void CWLSurfaceResource::presentFeedback(const Time::steady_tp& when, PHLMONITOR pMonitor, bool discarded) {
frame(when);
auto FEEDBACK = makeShared<CQueuedPresentationData>(m_self.lock());
auto FEEDBACK = makeUnique<CQueuedPresentationData>(m_self.lock());
FEEDBACK->attachMonitor(pMonitor);
if (discarded)
FEEDBACK->discarded();
else
FEEDBACK->presented();
PROTO::presentation->queueData(FEEDBACK);
PROTO::presentation->queueData(std::move(FEEDBACK));
}
CWLCompositorResource::CWLCompositorResource(SP<CWlCompositor> resource_) : m_resource(resource_) {