diff --git a/shell/common/animator.cc b/shell/common/animator.cc index f4b1846d46f4c..d954bdee3b7ce 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -62,9 +62,7 @@ void Animator::BeginFrame(ftl::TimePoint frame_time) { // to service potential frame. FTL_DCHECK(producer_continuation_); - // TODO(abarth): We should use |frame_time| instead, but the frame time we get - // on Android appears to be unstable. - last_begin_frame_time_ = ftl::TimePoint::Now(); + last_begin_frame_time_ = frame_time; engine_->BeginFrame(last_begin_frame_time_); } diff --git a/shell/platform/android/vsync_waiter_android.cc b/shell/platform/android/vsync_waiter_android.cc index a7585c0b9a802..411868a470695 100644 --- a/shell/platform/android/vsync_waiter_android.cc +++ b/shell/platform/android/vsync_waiter_android.cc @@ -37,7 +37,7 @@ void VsyncWaiterAndroid::AsyncWaitForVsync(Callback callback) { }); } -void VsyncWaiterAndroid::OnVsync(long frameTimeNanos) { +void VsyncWaiterAndroid::OnVsync(int64_t frameTimeNanos) { Callback callback = std::move(callback_); callback_ = Callback(); blink::Threads::UI()->PostTask([callback, frameTimeNanos] { @@ -61,7 +61,7 @@ static void OnNativeVsync(JNIEnv* env, VsyncWaiterAndroid* waiter = weak->get(); delete weak; if (waiter) { - waiter->OnVsync(frameTimeNanos); + waiter->OnVsync(static_cast(frameTimeNanos)); } } diff --git a/shell/platform/android/vsync_waiter_android.h b/shell/platform/android/vsync_waiter_android.h index 3fc232b6108fd..a9cfbd2115b05 100644 --- a/shell/platform/android/vsync_waiter_android.h +++ b/shell/platform/android/vsync_waiter_android.h @@ -22,7 +22,7 @@ class VsyncWaiterAndroid : public VsyncWaiter { void AsyncWaitForVsync(Callback callback) override; - void OnVsync(long frameTimeNanos); + void OnVsync(int64_t frameTimeNanos); private: Callback callback_;