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

Unified Diff: cc/animation/keyframed_animation_curve.cc

Issue 693883004: Make cc::animation::TrimTimeToCurrentIteration,cc::AnimationCurve::Duration use TimeTicks/TimeDelta (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/animation/keyframed_animation_curve.h ('k') | cc/animation/layer_animation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/keyframed_animation_curve.cc
diff --git a/cc/animation/keyframed_animation_curve.cc b/cc/animation/keyframed_animation_curve.cc
index 333a5c9a2e3c3568e35c21e34da017e25c0541ef..a6dc8c537e63fc1e33ed421e4b5925f3cb8ea8af 100644
--- a/cc/animation/keyframed_animation_curve.cc
+++ b/cc/animation/keyframed_animation_curve.cc
@@ -205,8 +205,9 @@ void KeyframedColorAnimationCurve::AddKeyframe(
InsertKeyframe(keyframe.Pass(), &keyframes_);
}
-double KeyframedColorAnimationCurve::Duration() const {
- return keyframes_.back()->Time() - keyframes_.front()->Time();
+base::TimeDelta KeyframedColorAnimationCurve::Duration() const {
+ return base::TimeDelta::FromSecondsD(keyframes_.back()->Time() -
+ keyframes_.front()->Time());
}
scoped_ptr<AnimationCurve> KeyframedColorAnimationCurve::Clone() const {
@@ -252,8 +253,9 @@ void KeyframedFloatAnimationCurve::AddKeyframe(
InsertKeyframe(keyframe.Pass(), &keyframes_);
}
-double KeyframedFloatAnimationCurve::Duration() const {
- return keyframes_.back()->Time() - keyframes_.front()->Time();
+base::TimeDelta KeyframedFloatAnimationCurve::Duration() const {
+ return base::TimeDelta::FromSecondsD(keyframes_.back()->Time() -
+ keyframes_.front()->Time());
}
scoped_ptr<AnimationCurve> KeyframedFloatAnimationCurve::Clone() const {
@@ -297,8 +299,9 @@ void KeyframedTransformAnimationCurve::AddKeyframe(
InsertKeyframe(keyframe.Pass(), &keyframes_);
}
-double KeyframedTransformAnimationCurve::Duration() const {
- return keyframes_.back()->Time() - keyframes_.front()->Time();
+base::TimeDelta KeyframedTransformAnimationCurve::Duration() const {
+ return base::TimeDelta::FromSecondsD(keyframes_.back()->Time() -
+ keyframes_.front()->Time());
}
scoped_ptr<AnimationCurve> KeyframedTransformAnimationCurve::Clone() const {
@@ -408,8 +411,9 @@ void KeyframedFilterAnimationCurve::AddKeyframe(
InsertKeyframe(keyframe.Pass(), &keyframes_);
}
-double KeyframedFilterAnimationCurve::Duration() const {
- return keyframes_.back()->Time() - keyframes_.front()->Time();
+base::TimeDelta KeyframedFilterAnimationCurve::Duration() const {
+ return base::TimeDelta::FromSecondsD(keyframes_.back()->Time() -
+ keyframes_.front()->Time());
}
scoped_ptr<AnimationCurve> KeyframedFilterAnimationCurve::Clone() const {
« no previous file with comments | « cc/animation/keyframed_animation_curve.h ('k') | cc/animation/layer_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698