mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Address bad developer experience in https://github.com/flutter/flutter/issues/106277 Leave as an error log and hope for more repro reports ```mermaid sequenceDiagram Animator ->> Animator: AwaitVSync Animator ->> VsyncWaiter: AsyncWaitForVsync(callback) VsyncWaiter -> VsyncWaiterAndroid: AwaitVSync note over VsyncWaiterAndroid: GetUITaskRunner VsyncWaiterAndroid -> Choreographer: PostFrameCallback Choreographer -> NDK: AChoreographer_postFrameCallback64 note over Choreographer,NDK: The time that the frame is being<br/>rendered as nanoseconds in the <br/>CLOCK_MONOTONIC time base NDK --> Choreographer: callback(nanos) Choreographer -> VsyncWaiterAndroid: callback note over VsyncWaiterAndroid: // Rollback suspicion<br/>if (frame_time > now) frame_time = now; VsyncWaiterAndroid -> VsyncWaiterAndroid: OnVsyncFromNDK(frame_nanos) VsyncWaiterAndroid -> VsyncWaiter: FireCallback(\n frame_start_time,\n target_time) VsyncWaiter -> Animator: callback(frame_timings_recorder) Animator -> Animator: BeginFrame(frame_timings_recorder) Animator -> Shell: OnAnimatorBeginFrame Shell -> Engine: BeginFrame(frame_time, frame_number) Engine -> RuntimeController: BeginFrame(frame_time, frame_number) RuntimeController -> PlatformConfiguration: BeginFrame(frame_time, frame_number) PlatformConfiguration -> hooks.dart: begin_frame_ ```