Chromium Code Reviews
DescriptionOn some platforms like Android input events are buffered and delivered
right before the vsync notification signifying the start of a new frame.
We can use this information to improve vsync render scheduling in two
ways:
1) Normally subscribing to a vsync notification incurs one frame of lag,
because the first event is only delivered for the next frame instead
of the current one. Instead, we can use an input event to synthesize
a virtual vsync event and start rendering the new frame immediately.
2) Input events and vsync notifications are sent as separate IPC
messages. Since input events arrive first, we can increase the time
available for rendering by using them instead of waiting for the
vsync notification. The difference is about 1 ms on a Nexus 4.
This patch also avoids setting the "last input event before vsync" bit
on pages that have JavaScript touch handlers. This is because on such
pages touch events may be sent after the vsync notification depending on
what the JavaScript touch handler does with the events.
BUG=168459
TEST=VSyncTimeSourceTest.SynthesizeVSyncFromInput
Patch Set 1 #Patch Set 2 : Use current time to estimate frame time for synthetic vsync. Add test. #Patch Set 3 : Remove vsync bit from TouchMove. Improve test. #Patch Set 4 : Don't set last-input-for-vsync bit on pages with touch handlers. #
Total comments: 5
Messages
Total messages: 5 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||