DescriptionReplace CurrentPhysicalTimeTicks with a fallback in CurrentFrameTimeTicks.
CurrentPhysicalTimeTicks was needed because some tasks are scheduled
independently from frames. They may fall hundreds of milliseconds after
the last frame, so it's not appropriate to use the last frame time for
them. So we used CurrentFrameTimeTicks for mid-animation timestamps and
CurrentPhysicalTimeTicks for input/random tasks (including the
scheduling of delayed animations). But there are two problems with this:
1) It's very easy to use the wrong one by accident.
2) Providing alternately frame and physical time to the same method can
lead to nonmonotonic time. The scrollbar fade controller currently
suffers from this and sometimes fails to fade the scrollbar as a result
(see bug).
This patch changes CurrentFrameTimeTicks to use physical time as a
fallback when frame time is unavailable. This is monotonic and can't be
used incorrectly.
NOTRY=true
BUG=356032
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259735
Patch Set 1 #Patch Set 2 : Fix test #
Messages
Total messages: 16 (0 generated)
|