forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace CurrentPhysicalTimeTicks with a fallback in CurrentFrameTimeT…
…icks. 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 Review URL: https://codereview.chromium.org/210793002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259735 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
aelias@chromium.org
committed
Mar 26, 2014
1 parent
09f8f54
commit 1dc0616
Showing
7 changed files
with
22 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters