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:
Lioncash
2019-02-14 12:42:58 -05:00
parent fcc3aa0bbf
commit bd983414f6
53 changed files with 536 additions and 400 deletions

View File

@ -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