diff options
author | Lioncash <mathew1800@gmail.com> | 2019-01-29 20:52:14 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-01-30 03:13:33 +0100 |
commit | d9f9bb7552986dff33b5c1906f9743ebdc9b58d1 (patch) | |
tree | 95edc1f154ebf9637eb188c6ecb434bae91904b0 /src/core/hle/service/nvflinger | |
parent | nvflinger: Use a std::array for the available displays instead of std::vector (diff) | |
download | yuzu-d9f9bb7552986dff33b5c1906f9743ebdc9b58d1.tar yuzu-d9f9bb7552986dff33b5c1906f9743ebdc9b58d1.tar.gz yuzu-d9f9bb7552986dff33b5c1906f9743ebdc9b58d1.tar.bz2 yuzu-d9f9bb7552986dff33b5c1906f9743ebdc9b58d1.tar.lz yuzu-d9f9bb7552986dff33b5c1906f9743ebdc9b58d1.tar.xz yuzu-d9f9bb7552986dff33b5c1906f9743ebdc9b58d1.tar.zst yuzu-d9f9bb7552986dff33b5c1906f9743ebdc9b58d1.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 5bc0d74e8..b774ce3a5 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -54,8 +54,8 @@ u64 NVFlinger::OpenDisplay(std::string_view name) { // TODO(Subv): Currently we only support the Default display. ASSERT(name == "Default"); - auto itr = std::find_if(displays.begin(), displays.end(), - [&](const Display& display) { return display.name == name; }); + const auto itr = std::find_if(displays.begin(), displays.end(), + [&](const Display& display) { return display.name == name; }); ASSERT(itr != displays.end()); @@ -67,8 +67,8 @@ u64 NVFlinger::CreateLayer(u64 display_id) { ASSERT_MSG(display.layers.empty(), "Only one layer is supported per display at the moment"); - u64 layer_id = next_layer_id++; - u32 buffer_queue_id = next_buffer_queue_id++; + const u64 layer_id = next_layer_id++; + const u32 buffer_queue_id = next_buffer_queue_id++; auto buffer_queue = std::make_shared<BufferQueue>(buffer_queue_id, layer_id); display.layers.emplace_back(layer_id, buffer_queue); buffer_queues.emplace_back(std::move(buffer_queue)); @@ -85,16 +85,16 @@ Kernel::SharedPtr<Kernel::ReadableEvent> NVFlinger::GetVsyncEvent(u64 display_id } std::shared_ptr<BufferQueue> NVFlinger::GetBufferQueue(u32 id) const { - auto itr = std::find_if(buffer_queues.begin(), buffer_queues.end(), - [&](const auto& queue) { return queue->GetId() == id; }); + const auto itr = std::find_if(buffer_queues.begin(), buffer_queues.end(), + [&](const auto& queue) { return queue->GetId() == id; }); ASSERT(itr != buffer_queues.end()); return *itr; } Display& NVFlinger::GetDisplay(u64 display_id) { - auto itr = std::find_if(displays.begin(), displays.end(), - [&](const Display& display) { return display.id == display_id; }); + const auto itr = std::find_if(displays.begin(), displays.end(), + [&](const Display& display) { return display.id == display_id; }); ASSERT(itr != displays.end()); return *itr; @@ -103,8 +103,8 @@ Display& NVFlinger::GetDisplay(u64 display_id) { Layer& NVFlinger::GetLayer(u64 display_id, u64 layer_id) { auto& display = GetDisplay(display_id); - auto itr = std::find_if(display.layers.begin(), display.layers.end(), - [&](const Layer& layer) { return layer.id == layer_id; }); + const auto itr = std::find_if(display.layers.begin(), display.layers.end(), + [&](const Layer& layer) { return layer.id == layer_id; }); ASSERT(itr != display.layers.end()); return *itr; @@ -139,7 +139,7 @@ void NVFlinger::Compose() { continue; } - auto& igbp_buffer = buffer->get().igbp_buffer; + const auto& igbp_buffer = buffer->get().igbp_buffer; // Now send the buffer to the GPU for drawing. // TODO(Subv): Support more than just disp0. The display device selection is probably based |