From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/threaded/ThreadedTimerQuery.h | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Runtime/GfxDevice/threaded/ThreadedTimerQuery.h (limited to 'Runtime/GfxDevice/threaded/ThreadedTimerQuery.h') diff --git a/Runtime/GfxDevice/threaded/ThreadedTimerQuery.h b/Runtime/GfxDevice/threaded/ThreadedTimerQuery.h new file mode 100644 index 0000000..b8aecbd --- /dev/null +++ b/Runtime/GfxDevice/threaded/ThreadedTimerQuery.h @@ -0,0 +1,29 @@ +#ifndef THREADEDTIMERQUERY_H +#define THREADEDTIMERQUERY_H + +#if ENABLE_PROFILER + +#include "Runtime/GfxDevice/GfxTimerQuery.h" + +class GfxDeviceClient; +struct ClientDeviceTimerQuery; + +class ThreadedTimerQuery : public GfxTimerQuery +{ +public: + ThreadedTimerQuery(GfxDeviceClient& device); + ~ThreadedTimerQuery(); + + virtual void Measure(); + virtual ProfileTimeFormat GetElapsed(UInt32 flags); + +private: + ProfileTimeFormat GetElapsedIfReady(); + void DoLockstep(); + + GfxDeviceClient& m_ClientDevice; + ClientDeviceTimerQuery* m_ClientQuery; +}; + +#endif +#endif -- cgit v1.1-26-g67d0