diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvnflinger/nvnflinger.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp index 5f55cd31e..a07c621d9 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.cpp +++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp @@ -17,6 +17,7 @@ #include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/nvnflinger/buffer_item_consumer.h" #include "core/hle/service/nvnflinger/buffer_queue_core.h" +#include "core/hle/service/nvnflinger/fb_share_buffer_manager.h" #include "core/hle/service/nvnflinger/hos_binder_driver_server.h" #include "core/hle/service/nvnflinger/nvnflinger.h" #include "core/hle/service/nvnflinger/ui/graphic_buffer.h" @@ -183,7 +184,7 @@ std::optional<u32> Nvnflinger::FindBufferQueueId(u64 display_id, u64 layer_id) { return layer->GetBinderId(); } -ResultVal<Kernel::KReadableEvent*> Nvnflinger::FindVsyncEvent(u64 display_id) { +Result Nvnflinger::FindVsyncEvent(Kernel::KReadableEvent** out_vsync_event, u64 display_id) { const auto lock_guard = Lock(); auto* const display = FindDisplay(display_id); @@ -191,7 +192,7 @@ ResultVal<Kernel::KReadableEvent*> Nvnflinger::FindVsyncEvent(u64 display_id) { return VI::ResultNotFound; } - return display->GetVSyncEvent(); + return display->GetVSyncEvent(out_vsync_event); } VI::Display* Nvnflinger::FindDisplay(u64 display_id) { @@ -331,4 +332,14 @@ s64 Nvnflinger::GetNextTicks() const { return static_cast<s64>(speed_scale * (1000000000.f / effective_fps)); } +FbShareBufferManager& Nvnflinger::GetSystemBufferManager() { + const auto lock_guard = Lock(); + + if (!system_buffer_manager) { + system_buffer_manager = std::make_unique<FbShareBufferManager>(system, *this, nvdrv); + } + + return *system_buffer_manager; +} + } // namespace Service::Nvnflinger |