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

Issue 27710005: cc: Use HighResNow as timebase if it is fast and reliable (Closed)

Created:
7 years, 2 months ago by brianderson
Modified:
7 years, 1 month ago
CC:
chromium-reviews, Ian Vollick, sievers+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

cc: Use HighResNow as timebase if it is fast and reliable If base::TimeTicks::HighResNow is fast and reliable, we use it for frame times, animations, and scheduling. Otherwise, we use base::TimeTicks::Now and use a timebase of zero to avoid an incorrect or jittery timebase. This adds a gfx::FrameTime::Now() function, so the same timebase is used across the ui and cc directories. Additionally, the OutputSurface now uses a HighRes version of the DelayBasedTimesource if gfx::FrameTime::Now() is HighRes. BUG=303356 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=231089

Patch Set 1 #

Patch Set 2 : add frame_time.h #

Total comments: 2

Patch Set 3 : typo #

Patch Set 4 : Add more gfx::FrameTime::Now() sources #

Patch Set 5 : rebase #

Patch Set 6 : Change namespace to class #

Patch Set 7 : fix class #

Patch Set 8 : rebase #

Patch Set 9 : Add missing include #

Total comments: 4

Patch Set 10 : Move 0 timebase decision to accelerated_surface_win.cc #

Patch Set 11 : Use 0 timebase for DWM codepath if FrameTime isn't high res #

Patch Set 12 : rebase #

Patch Set 13 : Fix FrameTime::FromQPCValue #

Patch Set 14 : Fix DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -134 lines) Patch
M cc/input/top_controls_manager.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M cc/input/top_controls_manager_unittest.cc View 7 chunks +7 lines, -6 lines 0 comments Download
M cc/layers/delegated_renderer_layer_impl_unittest.cc View 25 chunks +25 lines, -24 lines 0 comments Download
M cc/output/begin_frame_args.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M cc/output/output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -4 lines 0 comments Download
M cc/output/output_surface_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M cc/resources/resource_update_controller.cc View 2 chunks +2 lines, -1 line 0 comments Download
M cc/scheduler/delay_based_time_source.h View 2 chunks +18 lines, -1 line 0 comments Download
M cc/scheduler/delay_based_time_source.cc View 1 chunk +21 lines, -0 lines 0 comments Download
M cc/scheduler/frame_rate_controller.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 62 chunks +62 lines, -61 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -4 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M content/test/web_layer_tree_view_impl_for_testing.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +4 lines, -3 lines 0 comments Download
M ui/compositor/layer_animator.cc View 3 chunks +4 lines, -2 lines 0 comments Download
M ui/compositor/layer_animator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -2 lines 0 comments Download
M ui/compositor/test/layer_animator_test_controller.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M ui/gfx/animation/animation_container.cc View 4 chunks +4 lines, -3 lines 0 comments Download
A ui/gfx/frame_time.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +37 lines, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_surface_win.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -2 lines 0 comments Download
M ui/surface/accelerated_surface_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
brianderson
7 years, 2 months ago (2013-10-17 18:32:32 UTC) #1
brianderson
PTAL. frame_time.h just has a couple static methods for now so that everyone that needs ...
7 years, 2 months ago (2013-10-17 18:41:25 UTC) #2
ajuma
https://codereview.chromium.org/27710005/diff/5001/cc/trees/single_thread_proxy.cc File cc/trees/single_thread_proxy.cc (right): https://codereview.chromium.org/27710005/diff/5001/cc/trees/single_thread_proxy.cc#newcode63 cc/trees/single_thread_proxy.cc:63: if (!CommitAndComposite(gfx::FrameTime::Now(), We'll also need to fix the other ...
7 years, 2 months ago (2013-10-17 20:14:55 UTC) #3
brianderson
ptal
7 years, 2 months ago (2013-10-22 14:11:31 UTC) #4
ajuma
lgtm
7 years, 2 months ago (2013-10-22 16:54:35 UTC) #5
brianderson
+danakj and +piman for owners review.
7 years, 2 months ago (2013-10-22 16:59:12 UTC) #6
danakj
ui/gfx LGTM Can you base base::TimeTicks::Now and HighResNow in the cc/ PRESUBMIT.py?
7 years, 2 months ago (2013-10-22 21:06:15 UTC) #7
danakj
On 2013/10/22 21:06:15, danakj wrote: > ui/gfx LGTM > > Can you base base::TimeTicks::Now and ...
7 years, 2 months ago (2013-10-22 21:06:26 UTC) #8
piman
https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc File cc/scheduler/frame_rate_controller.cc (right): https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc#newcode101 cc/scheduler/frame_rate_controller.cc:101: timebase = base::TimeTicks(); mmh, aren't we losing functionality here? ...
7 years, 2 months ago (2013-10-23 00:03:45 UTC) #9
brianderson
On 2013/10/22 21:06:26, danakj wrote: > On 2013/10/22 21:06:15, danakj wrote: > > ui/gfx LGTM ...
7 years, 2 months ago (2013-10-23 13:04:22 UTC) #10
brianderson
https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc File cc/scheduler/frame_rate_controller.cc (right): https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc#newcode101 cc/scheduler/frame_rate_controller.cc:101: timebase = base::TimeTicks(); On 2013/10/23 00:03:45, piman wrote: > ...
7 years, 2 months ago (2013-10-23 13:04:42 UTC) #11
piman
https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc File cc/scheduler/frame_rate_controller.cc (right): https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc#newcode101 cc/scheduler/frame_rate_controller.cc:101: timebase = base::TimeTicks(); On 2013/10/23 13:04:43, Brian Anderson wrote: ...
7 years, 2 months ago (2013-10-23 23:45:07 UTC) #12
brianderson
https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc File cc/scheduler/frame_rate_controller.cc (right): https://codereview.chromium.org/27710005/diff/204001/cc/scheduler/frame_rate_controller.cc#newcode101 cc/scheduler/frame_rate_controller.cc:101: timebase = base::TimeTicks(); On 2013/10/23 23:45:08, piman wrote: > ...
7 years, 2 months ago (2013-10-24 11:26:51 UTC) #13
brianderson
ptal
7 years, 2 months ago (2013-10-24 15:28:10 UTC) #14
piman
lgtm
7 years, 2 months ago (2013-10-24 19:37:18 UTC) #15
jbauman
lgtm
7 years, 2 months ago (2013-10-25 00:57:17 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/27710005/864001
7 years, 1 month ago (2013-10-25 11:14:28 UTC) #17
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=32553
7 years, 1 month ago (2013-10-25 11:41:05 UTC) #18
brianderson
+kbr for owners review of ui/surface
7 years, 1 month ago (2013-10-25 12:50:44 UTC) #19
Ken Russell (switch to Gerrit)
ui/surface lgtm
7 years, 1 month ago (2013-10-25 17:53:19 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/27710005/864001
7 years, 1 month ago (2013-10-25 17:55:49 UTC) #21
commit-bot: I haz the power
7 years, 1 month ago (2013-10-25 19:46:53 UTC) #22
Message was sent while issue was closed.
Change committed as 231089

Powered by Google App Engine
This is Rietveld 408576698