This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,10 @@ const char* Animator::FrameParity() {
86
86
return (frame_number % 2 ) ? " even" : " odd" ;
87
87
}
88
88
89
- static int64_t FxlToDartOrEarlier (fml::TimePoint time) {
90
- int64_t dart_now = Dart_TimelineGetMicros ();
89
+ static fml::TimePoint FxlToDartOrEarlier (fml::TimePoint time) {
90
+ auto dart_now = fml::TimeDelta::FromMicroseconds ( Dart_TimelineGetMicros () );
91
91
fml::TimePoint fxl_now = fml::TimePoint::Now ();
92
- return (time - fxl_now). ToMicroseconds () + dart_now;
92
+ return fml::TimePoint::FromEpochDelta (time - fxl_now + dart_now) ;
93
93
}
94
94
95
95
void Animator::BeginFrame (
@@ -269,7 +269,8 @@ void Animator::AwaitVSync() {
269
269
}
270
270
});
271
271
272
- delegate_.OnAnimatorNotifyIdle (dart_frame_deadline_);
272
+ delegate_.OnAnimatorNotifyIdle (
273
+ dart_frame_deadline_.ToEpochDelta ().ToMicroseconds ());
273
274
}
274
275
275
276
void Animator::ScheduleSecondaryVsyncCallback (uintptr_t id,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ class Animator final {
106
106
107
107
std::unique_ptr<FrameTimingsRecorder> frame_timings_recorder_;
108
108
uint64_t frame_request_number_ = 1 ;
109
- int64_t dart_frame_deadline_ = 0 ;
109
+ fml::TimePoint dart_frame_deadline_;
110
110
std::shared_ptr<LayerTreePipeline> layer_tree_pipeline_;
111
111
fml::Semaphore pending_frame_semaphore_;
112
112
LayerTreePipeline::ProducerContinuation producer_continuation_;
You can’t perform that action at this time.
0 commit comments