diff options
author | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-25 19:46:46 +0000 |
---|---|---|
committer | brianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-25 19:46:46 +0000 |
commit | de2cf8caf24f9dff41462b4ed164d18c553b30e3 (patch) | |
tree | 9b7833a432e15c49b8217d529e17cc474c0e47af /cc/test/layer_tree_test.cc | |
parent | 406e93caa0d00078548cbbb830767f5cc976e32d (diff) | |
download | chromium_src-de2cf8caf24f9dff41462b4ed164d18c553b30e3.zip chromium_src-de2cf8caf24f9dff41462b4ed164d18c553b30e3.tar.gz chromium_src-de2cf8caf24f9dff41462b4ed164d18c553b30e3.tar.bz2 |
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
Review URL: https://codereview.chromium.org/27710005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/layer_tree_test.cc')
-rw-r--r-- | cc/test/layer_tree_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index d80c845..9ca0bbd 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -23,6 +23,7 @@ #include "cc/trees/layer_tree_host_impl.h" #include "cc/trees/single_thread_proxy.h" #include "testing/gmock/include/gmock/gmock.h" +#include "ui/gfx/frame_time.h" #include "ui/gfx/size_conversions.h" namespace cc { @@ -591,7 +592,7 @@ void LayerTreeTest::DispatchComposite() { } schedule_when_set_visible_true_ = false; - base::TimeTicks now = base::TimeTicks::Now(); + base::TimeTicks now = gfx::FrameTime::Now(); layer_tree_host_->Composite(now); } |