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.
This commit is contained in:
Lioncash
2019-02-21 11:31:53 -05:00
parent fd15730767
commit 90528f1326
7 changed files with 39 additions and 36 deletions

View File

@@ -39,11 +39,11 @@ void Display::SignalVSyncEvent() {
vsync_event.writable->Signal();
}
void Display::CreateLayer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> buffer_queue) {
void Display::CreateLayer(u64 id, NVFlinger::BufferQueue& buffer_queue) {
// TODO(Subv): Support more than 1 layer.
ASSERT_MSG(layers.empty(), "Only one layer is supported per display at the moment");
layers.emplace_back(id, std::move(buffer_queue));
layers.emplace_back(id, buffer_queue);
}
Layer* Display::FindLayer(u64 id) {

View File

@@ -67,7 +67,7 @@ public:
/// @param id The ID to assign to the created layer.
/// @param buffer_queue The buffer queue for the layer instance to use.
///
void CreateLayer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> buffer_queue);
void CreateLayer(u64 id, NVFlinger::BufferQueue& buffer_queue);
/// Attempts to find a layer with the given ID.
///