presentation: move to unique ptrs
less refcounting, move by rvalue.
This commit is contained in:
parent
f22b5971d1
commit
bcb96c5532
5 changed files with 35 additions and 26 deletions
|
|
@ -33,14 +33,14 @@ class CQueuedPresentationData {
|
|||
|
||||
class CPresentationFeedback {
|
||||
public:
|
||||
CPresentationFeedback(SP<CWpPresentationFeedback> resource_, SP<CWLSurfaceResource> surf);
|
||||
CPresentationFeedback(UP<CWpPresentationFeedback>&& resource_, SP<CWLSurfaceResource> surf);
|
||||
|
||||
bool good();
|
||||
|
||||
void sendQueued(SP<CQueuedPresentationData> data, const Time::steady_tp& when, uint32_t untilRefreshNs, uint64_t seq, uint32_t reportedFlags);
|
||||
void sendQueued(WP<CQueuedPresentationData> data, const Time::steady_tp& when, uint32_t untilRefreshNs, uint64_t seq, uint32_t reportedFlags);
|
||||
|
||||
private:
|
||||
SP<CWpPresentationFeedback> m_resource;
|
||||
UP<CWpPresentationFeedback> m_resource;
|
||||
WP<CWLSurfaceResource> 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<CQueuedPresentationData> data);
|
||||
void queueData(UP<CQueuedPresentationData>&& data);
|
||||
|
||||
private:
|
||||
void onManagerResourceDestroy(wl_resource* res);
|
||||
|
|
@ -63,8 +63,8 @@ class CPresentationProtocol : public IWaylandProtocol {
|
|||
|
||||
//
|
||||
std::vector<UP<CWpPresentation>> m_managers;
|
||||
std::vector<SP<CPresentationFeedback>> m_feedbacks;
|
||||
std::vector<SP<CQueuedPresentationData>> m_queue;
|
||||
std::vector<UP<CPresentationFeedback>> m_feedbacks;
|
||||
std::vector<UP<CQueuedPresentationData>> m_queue;
|
||||
|
||||
friend class CPresentationFeedback;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue