diff options
author | ajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-07 09:36:49 +0000 |
---|---|---|
committer | ajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-07 09:36:49 +0000 |
commit | e197af305cff172d061e6fa30cb41a353c43d703 (patch) | |
tree | a47d1a89ac03b444133902e947217ccdb3a92dac /cc/test/layer_tree_test.cc | |
parent | 3efc08f261c871a255d87bd126e390427333f4c7 (diff) | |
download | chromium_src-e197af305cff172d061e6fa30cb41a353c43d703.zip chromium_src-e197af305cff172d061e6fa30cb41a353c43d703.tar.gz chromium_src-e197af305cff172d061e6fa30cb41a353c43d703.tar.bz2 |
Make LayerTreeHostClient::Animate take TimeTicks instead of double
This makes LayerTreeHostClient::Animate take a TimeTicks instead of a
double, moving the conversion to double from the caller of Animate to
wherever doubles are actually needed.
This avoids precision loss caused by converting from TimeTicks to
double and back again when TimeTicks are actually needed (as in
LayerTreeHostClientForTesting::Animate) fixing the suspected cause
of flakiness in LayerTreeHostAnimationTestFrozenAnimationTickTime.
R=danakj,jamesr
TBR=sky
BUG=341517
Review URL: https://codereview.chromium.org/153633006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/layer_tree_test.cc')
-rw-r--r-- | cc/test/layer_tree_test.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index dd365c0..2dbab11 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -219,9 +219,8 @@ class LayerTreeHostClientForTesting : public LayerTreeHostClient, test_hooks_->DidBeginMainFrame(); } - virtual void Animate(double monotonic_time) OVERRIDE { - test_hooks_->Animate(base::TimeTicks::FromInternalValue( - monotonic_time * base::Time::kMicrosecondsPerSecond)); + virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE { + test_hooks_->Animate(monotonic_time); } virtual void Layout() OVERRIDE { test_hooks_->Layout(); } |