Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Issue 210793002: Replace CurrentPhysicalTimeTicks with a fallback in CurrentFrameTimeTicks. (Closed)

Created:
6 years, 9 months ago by aelias_OOO_until_Jul13
Modified:
6 years, 9 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, brianderson, jdduke (slow)
Visibility:
Public.

Description

Replace 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -32 lines) Patch
M cc/layers/layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.h View 2 chunks +1 line, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 5 chunks +14 lines, -16 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_impl.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M cc/trees/thread_proxy.cc View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
aelias_OOO_until_Jul13
PTAL. This is an alternative to https://codereview.chromium.org/184023002/ . It turns out there is an M35 ...
6 years, 9 months ago (2014-03-25 07:39:29 UTC) #1
mithro-old
On 2014/03/25 07:39:29, aelias wrote: > PTAL. This is an alternative to https://codereview.chromium.org/184023002/ . > ...
6 years, 9 months ago (2014-03-25 08:00:54 UTC) #2
aelias_OOO_until_Jul13
There are not always frames. If I visit a simple text page and sit idle ...
6 years, 9 months ago (2014-03-25 08:07:16 UTC) #3
aelias_OOO_until_Jul13
I do appreciate the importance of aligning with vsync, by the way. I agree everything ...
6 years, 9 months ago (2014-03-25 08:10:04 UTC) #4
mithro-old
On 2014/03/25 08:10:04, aelias wrote: > I do appreciate the importance of aligning with vsync, ...
6 years, 9 months ago (2014-03-25 08:31:41 UTC) #5
aelias_OOO_until_Jul13
Not every input triggers an immediate redraw. The one at issue here is a ScrollEnd ...
6 years, 9 months ago (2014-03-25 08:48:51 UTC) #6
mithro-old
On 2014/03/25 08:48:51, aelias wrote: > Not every input triggers an immediate redraw. The one ...
6 years, 9 months ago (2014-03-25 09:02:56 UTC) #7
aelias_OOO_until_Jul13
On 2014/03/25 09:02:56, mithro wrote: > There is a definite trigger of ScrollEnd right (even ...
6 years, 9 months ago (2014-03-25 09:14:06 UTC) #8
aelias_OOO_until_Jul13
I'm looking into switching to callbacks, but it's likely to be a fairly large patch ...
6 years, 9 months ago (2014-03-26 04:37:37 UTC) #9
mithro-old
On 2014/03/26 04:37:37, aelias wrote: > I'm looking into switching to callbacks, but it's likely ...
6 years, 9 months ago (2014-03-26 05:52:10 UTC) #10
aelias_OOO_until_Jul13
On 2014/03/26 05:52:10, mithro wrote: > I don't see how this patch fixes the M35 ...
6 years, 9 months ago (2014-03-26 06:01:30 UTC) #11
mithro-old
After discussion with aelias I'm happy with this change. Can you please get a second ...
6 years, 9 months ago (2014-03-26 06:58:03 UTC) #12
brianderson
lgtm
6 years, 9 months ago (2014-03-26 21:44:46 UTC) #13
aelias_OOO_until_Jul13
The CQ bit was checked by aelias@chromium.org
6 years, 9 months ago (2014-03-26 21:56:39 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aelias@chromium.org/210793002/40001
6 years, 9 months ago (2014-03-26 21:57:36 UTC) #15
commit-bot: I haz the power
6 years, 9 months ago (2014-03-26 22:54:51 UTC) #16
Message was sent while issue was closed.
Change committed as 259735

Powered by Google App Engine
This is Rietveld 408576698