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

Unified Diff: webkit/compositor_bindings/web_transform_animation_curve_impl.cc

Issue 11644004: Only create instances of WebTransformOperations using cc::TransformOperations::Create (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase, and fix WebTransformAnimationCurveImpl Created 8 years 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: webkit/compositor_bindings/web_transform_animation_curve_impl.cc
diff --git a/webkit/compositor_bindings/web_transform_animation_curve_impl.cc b/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
index 5946730936461f3d64f682757c51667d662e0d5c..6ff4f410604062fb74467e0624af1942243a8598 100644
--- a/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
+++ b/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
@@ -31,12 +31,20 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe)
void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, TimingFunctionType type)
{
+#ifdef WEBKIT_WEB_TRANSFORM_OPERATIONS_USE_CREATE
+ m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time(), keyframe.value(), createTimingFunction(type)));
ajuma 2012/12/20 16:48:11 WebTransformKeyframe will no longer be able to dir
+#else
m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type)));
+#endif
}
void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, double x1, double y1, double x2, double y2)
{
+#ifdef WEBKIT_WEB_TRANSFORM_OPERATIONS_USE_CREATE
+ m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time(), keyframe.value(), cc::CubicBezierTimingFunction::create(x1, y1, x2, y2).PassAs<cc::TimingFunction>()));
+#else
m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time, keyframe.value, cc::CubicBezierTimingFunction::create(x1, y1, x2, y2).PassAs<cc::TimingFunction>()));
+#endif
}
WebTransformationMatrix WebTransformAnimationCurveImpl::getValue(double time) const

Powered by Google App Engine
This is Rietveld 408576698