mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-29 23:47:57 -05:00
core: barrier service thread shutdown
This commit is contained in:
@ -102,15 +102,19 @@ NVFlinger::~NVFlinger() {
|
||||
system.CoreTiming().UnscheduleEvent(single_composition_event, {});
|
||||
}
|
||||
|
||||
ShutdownLayers();
|
||||
|
||||
if (nvdrv) {
|
||||
nvdrv->Close(disp_fd);
|
||||
}
|
||||
}
|
||||
|
||||
void NVFlinger::ShutdownLayers() {
|
||||
for (auto& display : displays) {
|
||||
for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) {
|
||||
display.GetLayer(layer).Core().NotifyShutdown();
|
||||
}
|
||||
}
|
||||
|
||||
if (nvdrv) {
|
||||
nvdrv->Close(disp_fd);
|
||||
}
|
||||
}
|
||||
|
||||
void NVFlinger::SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance) {
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
explicit NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_);
|
||||
~NVFlinger();
|
||||
|
||||
void ShutdownLayers();
|
||||
|
||||
/// Sets the NVDrv module instance to use to send buffers to the GPU.
|
||||
void SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance);
|
||||
|
||||
|
@ -303,4 +303,8 @@ Services::Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system
|
||||
|
||||
Services::~Services() = default;
|
||||
|
||||
void Services::KillNVNFlinger() {
|
||||
nv_flinger->ShutdownLayers();
|
||||
}
|
||||
|
||||
} // namespace Service
|
||||
|
@ -238,6 +238,8 @@ public:
|
||||
explicit Services(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system);
|
||||
~Services();
|
||||
|
||||
void KillNVNFlinger();
|
||||
|
||||
private:
|
||||
std::unique_ptr<NVFlinger::HosBinderDriverServer> hos_binder_driver_server;
|
||||
std::unique_ptr<NVFlinger::NVFlinger> nv_flinger;
|
||||
|
Reference in New Issue
Block a user