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

Unified Diff: cc/blink/web_transform_animation_curve_impl.cc

Issue 719453007: Make Keyframe use TimeTicks/TimeDelta to represent time instead of double. (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/blink/web_scroll_offset_animation_curve_impl.cc ('k') | cc/input/top_controls_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_transform_animation_curve_impl.cc
diff --git a/cc/blink/web_transform_animation_curve_impl.cc b/cc/blink/web_transform_animation_curve_impl.cc
index f91d94b27c1bae009224b7463299b0e60c41815c..86f3602cecd560cdb10d4fe709d3a61ae117b697 100644
--- a/cc/blink/web_transform_animation_curve_impl.cc
+++ b/cc/blink/web_transform_animation_curve_impl.cc
@@ -36,7 +36,8 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe,
static_cast<const WebTransformOperationsImpl&>(keyframe.value())
.AsTransformOperations();
curve_->AddKeyframe(cc::TransformKeyframe::Create(
- keyframe.time(), transform_operations, CreateTimingFunction(type)));
+ base::TimeDelta::FromSecondsD(keyframe.time()), transform_operations,
+ CreateTimingFunction(type)));
}
void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe,
@@ -48,8 +49,7 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe,
static_cast<const WebTransformOperationsImpl&>(keyframe.value())
.AsTransformOperations();
curve_->AddKeyframe(cc::TransformKeyframe::Create(
- keyframe.time(),
- transform_operations,
+ base::TimeDelta::FromSecondsD(keyframe.time()), transform_operations,
cc::CubicBezierTimingFunction::Create(x1, y1, x2, y2)));
}
« no previous file with comments | « cc/blink/web_scroll_offset_animation_curve_impl.cc ('k') | cc/input/top_controls_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698