blob: 92ab9399fa7d3fe1dc1d6476367799a3ad0aa2b8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <set>
#include "common/common_types.h"
#include "core/hle/result.h"
#include "core/hle/service/am/am_types.h"
namespace Core {
class System;
}
namespace Kernel {
class KProcess;
}
namespace Service::Nvnflinger {
class Nvnflinger;
}
namespace Service::AM {
class DisplayLayerManager {
public:
explicit DisplayLayerManager();
~DisplayLayerManager();
void Initialize(Core::System& system, Kernel::KProcess* process, AppletId applet_id,
LibraryAppletMode mode);
void Finalize();
Result CreateManagedDisplayLayer(u64* out_layer);
Result CreateManagedDisplaySeparableLayer(u64* out_layer, u64* out_recording_layer);
Result IsSystemBufferSharingEnabled();
Result GetSystemSharedLayerHandle(u64* out_system_shared_buffer_id,
u64* out_system_shared_layer_id);
void SetWindowVisibility(bool visible);
bool GetWindowVisibility() const;
Result WriteAppletCaptureBuffer(bool* out_was_written, s32* out_fbshare_layer_index);
private:
Kernel::KProcess* m_process{};
std::shared_ptr<Nvnflinger::Nvnflinger> m_surface_flinger{};
std::set<u64> m_managed_display_layers{};
std::set<u64> m_managed_display_recording_layers{};
u64 m_system_shared_buffer_id{};
u64 m_system_shared_layer_id{};
AppletId m_applet_id{};
bool m_buffer_sharing_enabled{};
bool m_blending_enabled{};
bool m_visible{true};
};
} // namespace Service::AM
|