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

Unified Diff: webkit/renderer/compositor_bindings/web_animation_impl.cc

Issue 226543005: CC should use TimeTicks and TimeDelta to represent time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/input/page_scale_animation.h ('K') | « ui/compositor/layer_animator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_animation_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_animation_impl.cc b/webkit/renderer/compositor_bindings/web_animation_impl.cc
index c401d5c974128060ca7a6f59530fa726ff1dd463..ce9046ba9aeb349ff8e0b84e13ec00f2514ce06a 100644
--- a/webkit/renderer/compositor_bindings/web_animation_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_animation_impl.cc
@@ -84,7 +84,8 @@ void WebAnimationImpl::setIterations(int n) { animation_->set_iterations(n); }
double WebAnimationImpl::startTime() const { return animation_->start_time(); }
void WebAnimationImpl::setStartTime(double monotonic_time) {
- animation_->set_start_time(monotonic_time);
+ animation_->set_start_time(base::TimeTicks::FromInternalValue(
+ monotonic_time * base::Time::kMicrosecondsPerSecond));
}
double WebAnimationImpl::timeOffset() const {
@@ -92,7 +93,8 @@ double WebAnimationImpl::timeOffset() const {
}
void WebAnimationImpl::setTimeOffset(double monotonic_time) {
- animation_->set_time_offset(monotonic_time);
+ animation_->set_time_offset(base::TimeTicks::FromInternalValue(
+ monotonic_time * base::Time::kMicrosecondsPerSecond));
}
bool WebAnimationImpl::alternatesDirection() const {
« cc/input/page_scale_animation.h ('K') | « ui/compositor/layer_animator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698