-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
| Bad | Expected |
|---|---|
tracking-bad.mov |
tracking-expected.mov |
When touch event is received, instead of immediately beginning a frame Flutter waits for next vsync. But that skips an entire frame. By the time vsync comes, the frame should be already rendered and ready to go. But instead it has just began. On iOS touch events seem to be delivered within few milliseconds of the display link callback so there should be enough time.
You can pause the "bad" video to see that during scrolling Flutter lags behind native by one frame exactly.
The expected video is with quick and dirty engine modification that forces BeginFrame immediately on input event.
The way vsync is implemented in Flutter might need some work. It should make sure that repaints are synchronized with display updates, but it shouldn't be causing additional latency.