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/resources/resource_update_controller.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/resources/resource_update_controller.cc')
-rw-r--r-- | cc/resources/resource_update_controller.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/resources/resource_update_controller.cc b/cc/resources/resource_update_controller.cc index 3114d1e..59c536b 100644 --- a/cc/resources/resource_update_controller.cc +++ b/cc/resources/resource_update_controller.cc @@ -9,6 +9,7 @@ #include "base/single_thread_task_runner.h" #include "cc/resources/prioritized_resource.h" #include "cc/resources/resource_provider.h" +#include "ui/gfx/frame_time.h" namespace { @@ -113,7 +114,7 @@ void ResourceUpdateController::OnTimerFired() { } base::TimeTicks ResourceUpdateController::Now() const { - return base::TimeTicks::Now(); + return gfx::FrameTime::Now(); } base::TimeDelta ResourceUpdateController::UpdateMoreTexturesTime() const { |