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

Unified Diff: sky/viewer/cc/web_float_animation_curve_impl.cc

Issue 737943002: Update from https://crrev.com/304715 (Closed) Base URL: git@github.com:domokit/mojo.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
Index: sky/viewer/cc/web_float_animation_curve_impl.cc
diff --git a/sky/viewer/cc/web_float_animation_curve_impl.cc b/sky/viewer/cc/web_float_animation_curve_impl.cc
index 2812471080867db49b4c0ca4085a41d4df9b404d..f39f88199cdc8d184189fa79ae986d39c03e53e5 100644
--- a/sky/viewer/cc/web_float_animation_curve_impl.cc
+++ b/sky/viewer/cc/web_float_animation_curve_impl.cc
@@ -31,8 +31,9 @@ void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe) {
void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe,
TimingFunctionType type) {
- curve_->AddKeyframe(cc::FloatKeyframe::Create(
- keyframe.time, keyframe.value, CreateTimingFunction(type)));
+ curve_->AddKeyframe(
+ cc::FloatKeyframe::Create(base::TimeDelta::FromSecondsD(keyframe.time),
+ keyframe.value, CreateTimingFunction(type)));
}
void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe,
@@ -41,13 +42,12 @@ void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe,
double x2,
double y2) {
curve_->AddKeyframe(cc::FloatKeyframe::Create(
- keyframe.time,
- keyframe.value,
+ base::TimeDelta::FromSecondsD(keyframe.time), keyframe.value,
cc::CubicBezierTimingFunction::Create(x1, y1, x2, y2).Pass()));
}
float WebFloatAnimationCurveImpl::getValue(double time) const {
- return curve_->GetValue(time);
+ return curve_->GetValue(base::TimeDelta::FromSecondsD(time));
}
scoped_ptr<cc::AnimationCurve>
« no previous file with comments | « sky/viewer/cc/web_filter_animation_curve_impl.cc ('k') | sky/viewer/cc/web_transform_animation_curve_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698