diff options
author | Liam <byteslice@airmail.cc> | 2024-02-12 05:50:48 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-18 00:00:28 +0100 |
commit | 7b79cddacd4e62a08ed1b501fb20c926d66ff7b6 (patch) | |
tree | 4ef697389cc90fb3588223d0cc41e71c91d4aa6d /src/core/hle/service/am/managed_layer_holder.cpp | |
parent | Merge pull request #13017 from liamwhite/suspension (diff) | |
download | yuzu-7b79cddacd4e62a08ed1b501fb20c926d66ff7b6.tar yuzu-7b79cddacd4e62a08ed1b501fb20c926d66ff7b6.tar.gz yuzu-7b79cddacd4e62a08ed1b501fb20c926d66ff7b6.tar.bz2 yuzu-7b79cddacd4e62a08ed1b501fb20c926d66ff7b6.tar.lz yuzu-7b79cddacd4e62a08ed1b501fb20c926d66ff7b6.tar.xz yuzu-7b79cddacd4e62a08ed1b501fb20c926d66ff7b6.tar.zst yuzu-7b79cddacd4e62a08ed1b501fb20c926d66ff7b6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/am/managed_layer_holder.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/core/hle/service/am/managed_layer_holder.cpp b/src/core/hle/service/am/managed_layer_holder.cpp deleted file mode 100644 index 61eb8641a..000000000 --- a/src/core/hle/service/am/managed_layer_holder.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/am/managed_layer_holder.h" -#include "core/hle/service/nvnflinger/nvnflinger.h" - -namespace Service::AM { - -ManagedLayerHolder::ManagedLayerHolder() = default; -ManagedLayerHolder::~ManagedLayerHolder() { - if (!m_nvnflinger) { - return; - } - - for (const auto& layer : m_managed_display_layers) { - m_nvnflinger->DestroyLayer(layer); - } - - for (const auto& layer : m_managed_display_recording_layers) { - m_nvnflinger->DestroyLayer(layer); - } - - m_nvnflinger = nullptr; -} - -void ManagedLayerHolder::Initialize(Nvnflinger::Nvnflinger* nvnflinger) { - m_nvnflinger = nvnflinger; -} - -void ManagedLayerHolder::CreateManagedDisplayLayer(u64* out_layer) { - // TODO(Subv): Find out how AM determines the display to use, for now just - // create the layer in the Default display. - const auto display_id = m_nvnflinger->OpenDisplay("Default"); - const auto layer_id = m_nvnflinger->CreateLayer(*display_id); - - m_managed_display_layers.emplace(*layer_id); - - *out_layer = *layer_id; -} - -void ManagedLayerHolder::CreateManagedDisplaySeparableLayer(u64* out_layer, - u64* out_recording_layer) { - // TODO(Subv): Find out how AM determines the display to use, for now just - // create the layer in the Default display. - // This calls nn::vi::CreateRecordingLayer() which creates another layer. - // Currently we do not support more than 1 layer per display, output 1 layer id for now. - // Outputting 1 layer id instead of the expected 2 has not been observed to cause any adverse - // side effects. - // TODO: Support multiple layers - const auto display_id = m_nvnflinger->OpenDisplay("Default"); - const auto layer_id = m_nvnflinger->CreateLayer(*display_id); - - m_managed_display_layers.emplace(*layer_id); - - *out_layer = *layer_id; - *out_recording_layer = 0; -} - -} // namespace Service::AM |