mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-24 11:07:52 -05:00
core_timing: Convert core timing into a class
Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
This commit is contained in:
@ -15,8 +15,9 @@
|
||||
#include "core/hle/kernel/object.h"
|
||||
|
||||
namespace Core::Timing {
|
||||
class CoreTiming;
|
||||
struct EventType;
|
||||
}
|
||||
} // namespace Core::Timing
|
||||
|
||||
namespace Kernel {
|
||||
class ReadableEvent;
|
||||
@ -52,7 +53,7 @@ struct Display {
|
||||
|
||||
class NVFlinger final {
|
||||
public:
|
||||
NVFlinger();
|
||||
explicit NVFlinger(Core::Timing::CoreTiming& core_timing);
|
||||
~NVFlinger();
|
||||
|
||||
/// Sets the NVDrv module instance to use to send buffers to the GPU.
|
||||
@ -117,6 +118,9 @@ private:
|
||||
|
||||
/// Event that handles screen composition.
|
||||
Core::Timing::EventType* composition_event;
|
||||
|
||||
/// Core timing instance for registering/unregistering the composition event.
|
||||
Core::Timing::CoreTiming& core_timing;
|
||||
};
|
||||
|
||||
} // namespace Service::NVFlinger
|
||||
|
Reference in New Issue
Block a user