diff options
| author | bunnei <bunneidev@gmail.com> | 2020-01-07 12:45:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-07 12:45:34 -0500 |
| commit | 319c4d2108036a2fa68128934665d0b49f96088b (patch) | |
| tree | ea0387f377c719d6397b808fc1a017a154448538 /src/core/hle/service/nvflinger | |
| parent | 5be00cba158e5ad2c36c2c5d73603c178857c12b (diff) | |
| parent | 64c56315793d2b6dbf7a55f99d4bcc51929f03cb (diff) | |
Merge pull request #3272 from bunnei/vi-close-layer
service: vi: Implement CloseLayer.
Diffstat (limited to 'src/core/hle/service/nvflinger')
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 9810d2c64..62752e419 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -88,6 +88,12 @@ std::optional<u64> NVFlinger::CreateLayer(u64 display_id) { return layer_id; } +void NVFlinger::CloseLayer(u64 layer_id) { + for (auto& display : displays) { + display.CloseLayer(layer_id); + } +} + std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) const { const auto* const layer = FindLayer(display_id, layer_id); diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index e3cc14bdc..57a21f33b 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -54,6 +54,9 @@ public: /// If an invalid display ID is specified, then an empty optional is returned. std::optional<u64> CreateLayer(u64 display_id); + /// Closes a layer on all displays for the given layer ID. + void CloseLayer(u64 layer_id); + /// Finds the buffer queue ID of the specified layer in the specified display. /// /// If an invalid display ID or layer ID is provided, then an empty optional is returned. |
