From 712afaa45baf1975efa19b31a356fe8d3a0f8aea Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Fri, 30 Aug 2019 19:13:42 -0700 Subject: [PATCH] Adjust iOS frame start times to match the platform info --- 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 8fbe25c8690d6..a920f826f9341 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 @@ - (void)await { } - (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;