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

Unified Diff: webkit/compositor_bindings/web_transform_animation_curve_impl.cc

Issue 11745018: Not for review: Move the implementation of WebTransformOperations into chromium (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: New approach Created 7 years, 11 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
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 3117d0a969cba652e38ca6fbc7b326e68591806a..78a8e92172483184cc142d641d64ebc3be1c3d0a 100644
--- a/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
+++ b/webkit/compositor_bindings/web_transform_animation_curve_impl.cc
@@ -6,7 +6,9 @@
#include "cc/keyframed_animation_curve.h"
#include "cc/timing_function.h"
+#include "cc/transform_operations.h"
#include "webkit/compositor_bindings/web_animation_curve_common.h"
+#include "webkit/compositor_bindings/web_transform_operations_impl.h"
namespace WebKit {
@@ -31,12 +33,16 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe)
void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, TimingFunctionType type)
{
- m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time, keyframe.value, createTimingFunction(type)));
+ const cc::TransformOperations& transformOperations =
+ static_cast<const WebTransformOperationsImpl&>(keyframe.value()).AsTransformOperations();
+ m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time(), transformOperations, createTimingFunction(type)));
}
void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, double x1, double y1, double x2, double y2)
{
- m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time, keyframe.value, cc::CubicBezierTimingFunction::create(x1, y1, x2, y2).PassAs<cc::TimingFunction>()));
+ const cc::TransformOperations& transformOperations =
+ static_cast<const WebTransformOperationsImpl&>(keyframe.value()).AsTransformOperations();
+ m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time(), transformOperations, cc::CubicBezierTimingFunction::create(x1, y1, x2, y2).PassAs<cc::TimingFunction>()));
}
WebTransformationMatrix WebTransformAnimationCurveImpl::getValue(double time) const

Powered by Google App Engine
This is Rietveld 408576698