summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-01-04 06:45:06 +0100
committerbunnei <bunneidev@gmail.com>2020-01-04 06:45:06 +0100
commit64c56315793d2b6dbf7a55f99d4bcc51929f03cb (patch)
tree4cd4a922499783c6369a60068442dee51cdfffe3 /src/core/hle/service/nvflinger
parentMerge pull request #3247 from FernandoS27/remap-fix (diff)
downloadyuzu-64c56315793d2b6dbf7a55f99d4bcc51929f03cb.tar
yuzu-64c56315793d2b6dbf7a55f99d4bcc51929f03cb.tar.gz
yuzu-64c56315793d2b6dbf7a55f99d4bcc51929f03cb.tar.bz2
yuzu-64c56315793d2b6dbf7a55f99d4bcc51929f03cb.tar.lz
yuzu-64c56315793d2b6dbf7a55f99d4bcc51929f03cb.tar.xz
yuzu-64c56315793d2b6dbf7a55f99d4bcc51929f03cb.tar.zst
yuzu-64c56315793d2b6dbf7a55f99d4bcc51929f03cb.zip
Diffstat (limited to 'src/core/hle/service/nvflinger')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp6
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.h3
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 52623cf89..a58ea9c59 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.