| 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..de27927de4d9c4805bfb08e0e0132235552d951e 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,24 @@ void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe)
|
|
|
| void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe, TimingFunctionType type)
|
| {
|
| +#if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
|
| + const cc::TransformOperations& transformOperations =
|
| + static_cast<const WebTransformOperationsImpl&>(keyframe.value()).AsTransformOperations();
|
| + m_curve->addKeyframe(cc::TransformKeyframe::create(keyframe.time(), transformOperations, createTimingFunction(type)));
|
| +#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)
|
| {
|
| +#if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
|
| + 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>()));
|
| +#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
|
|
|