Adjust iOS frame start times to match the platform info (#11802)

This commit is contained in:
Jim Graham
2019-09-11 19:08:56 -07:00
committed by GitHub
parent 1de28d032a
commit bbb1f12467
@@ -114,7 +114,8 @@ float VsyncWaiterIOS::GetDisplayRefreshRate() const {
}
- (void)onDisplayLink:(CADisplayLink*)link {
fml::TimePoint frame_start_time = fml::TimePoint::Now();
CFTimeInterval delay = CACurrentMediaTime() - link.timestamp;
fml::TimePoint frame_start_time = fml::TimePoint::Now() - fml::TimeDelta::FromSecondsF(delay);
fml::TimePoint frame_target_time = frame_start_time + fml::TimeDelta::FromSecondsF(link.duration);
display_link_.get().paused = YES;