27 #ifndef OVR_CAPI_FrameTimeManager_h
28 #define OVR_CAPI_FrameTimeManager_h
30 #include "../OVR_CAPI.h"
31 #include "../Kernel/OVR_Timer.h"
32 #include "../Kernel/OVR_Math.h"
33 #include "../Util/Util_Render_Stereo.h"
34 #include "../Util/Util_LatencyTest2.h"
36 namespace OVR {
namespace CAPI {
83 void SaveDrawColor(
unsigned char drawColor,
double endFrameTime,
84 double renderIMUTime,
double timewarpIMUTime );
173 double thisFrameTime,
unsigned int frameIndex);
182 bool dynamicPrediction,
bool sdkRender);
262 #endif // OVR_CAPI_FrameTimeManager_h
void InitTimingFromInputs(const TimingInputs &inputs, HmdShutterTypeEnum shutterType, double thisFrameTime, unsigned int frameIndex)
void GetLatencyTimings(float latencies[3])
bool NeedDistortionTimeMeasurement() const
unsigned char GetNextDrawColor()
double VSyncToScanoutDelay
FrameTimeRecordEx FrameEndTimes[FramesTracked]
double calcTimewarpWaitDelta() const
const Timing & GetFrameTiming() const
double RenderIMUTimeSeconds
double TimewarpIMUTimeSeconds
void SaveDrawColor(unsigned char drawColor, double endFrameTime, double renderIMUTime, double timewarpIMUTime)
double GetEyePredictionTime(ovrEyeType eye)
Transformf GetEyePredictionPose(ovrHmd hmd, ovrEyeType eye)
double ScreenSwitchingDelay
double RenderLatencySeconds
TimeDeltaCollector DistortionRenderTimes
void Init(HmdRenderInfo &renderInfo)
double RenderIMUTimeSeconds
FrameLatencyTracker ScreenLatencyTracker
void SetVsync(bool enabled)
double TimeBufferSeconds[Capacity]
double TimewarpIMUTimeSeconds
unsigned char GetFrameLatencyTestDrawColor()
double calcScreenDelay() const
TimeDeltaCollector FrameDeltas
void AddDistortionTimeMeasurement(double distortionTimeSeconds)
void GetLatencyTimings(float latencies[3])
double NoVSyncToScanoutDelay
void GetTimewarpPredictions(ovrEyeType eye, double timewarpStartEnd[2])
double BeginFrame(unsigned frameIndex)
void UpdateFrameLatencyTrackingAfterEndFrame(unsigned char frameLatencyTestColor, const Util::FrameTimeRecordSet &rs)
void AddTimeDelta(double timeSeconds)
double calcFrameDelta() const
double GetMedianTimeDelta() const
void ResetFrameTiming(unsigned frameIndex, bool dynamicPrediction, bool sdkRender)
__BEGIN_NAMESPACE_STD void void __END_NAMESPACE_STD void __BEGIN_NAMESPACE_STD void * memset(void *__s, int __c, size_t __n) __THROW __nonnull((1))
double TimeWarpStartEndTimes[2][2]
void MatchRecord(const Util::FrameTimeRecordSet &r)
FrameTimeManager(bool vsyncEnabled=true)
TimeDeltaCollector FrameTimeDeltas
double TimewarpLatencySeconds
LocklessUpdater< Timing > LocklessTiming
void GetTimewarpMatrices(ovrHmd hmd, ovrEyeType eye, ovrPosef renderPose, ovrMatrix4f twmOut[2])