From bbb1f124671be7b7dc2c540ad428306eeceecfdb Mon Sep 17 00:00:00 2001 From: Jim Graham <50503328+flar@users.noreply.github.com> Date: Wed, 11 Sep 2019 19:08:56 -0700 Subject: [PATCH] Adjust iOS frame start times to match the platform info (#11802) --- shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm b/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm index 8fbe25c86..a920f826f 100644 --- a/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm +++ b/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm @@ -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; -- GitLab