From 90528f132678ea7dfa9ac4588ae2b8c7808d4685 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 21 Feb 2019 11:31:53 -0500 Subject: service/nvflinger: Store BufferQueue instances as regular data members The NVFlinger service is already passed into services that need to guarantee its lifetime, so the BufferQueue instances will already live as long as they're needed. Making them std::shared_ptr instances in this case is unnecessary. --- src/core/hle/service/nvflinger/nvflinger.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service/nvflinger/nvflinger.h') diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index f9458745a..c0a83fffb 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -65,7 +65,10 @@ public: Kernel::SharedPtr FindVsyncEvent(u64 display_id) const; /// Obtains a buffer queue identified by the ID. - std::shared_ptr FindBufferQueue(u32 id) const; + BufferQueue& FindBufferQueue(u32 id); + + /// Obtains a buffer queue identified by the ID. + const BufferQueue& FindBufferQueue(u32 id) const; /// Performs a composition request to the emulated nvidia GPU and triggers the vsync events when /// finished. @@ -87,7 +90,7 @@ private: std::shared_ptr nvdrv; std::vector displays; - std::vector> buffer_queues; + std::vector buffer_queues; /// Id to use for the next layer that is created, this counter is shared among all displays. u64 next_layer_id = 1; -- cgit v1.2.3