| Index: cc/test/animation_test_common.cc
|
| diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
|
| index 6b896b6644820544a143a1a4008965970455d87b..13af91d6a75bd326bfad7a83e325c54e3b0bb149 100644
|
| --- a/cc/test/animation_test_common.cc
|
| +++ b/cc/test/animation_test_common.cc
|
| @@ -8,6 +8,7 @@
|
| #include "cc/layer.h"
|
| #include "cc/layer_animation_controller.h"
|
| #include "cc/layer_impl.h"
|
| +#include "cc/transform_operations.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperations.h"
|
|
|
| using cc::Animation;
|
| @@ -49,6 +50,16 @@ int addAnimatedTransform(Target& target, double duration, int deltaX, int deltaY
|
| {
|
| scoped_ptr<KeyframedTransformAnimationCurve> curve(KeyframedTransformAnimationCurve::create());
|
|
|
| +#if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
|
| + if (duration > 0) {
|
| + TransformOperations startOperations;
|
| + startOperations.AppendTranslate(deltaX, deltaY, 0);
|
| + curve->addKeyframe(TransformKeyframe::create(0, startOperations, scoped_ptr<cc::TimingFunction>()));
|
| + }
|
| +
|
| + TransformOperations operations;
|
| + operations.AppendTranslate(deltaX, deltaY, 0);
|
| +#else
|
| if (duration > 0) {
|
| WebKit::WebTransformOperations startOperations;
|
| startOperations.appendTranslate(deltaX, deltaY, 0);
|
| @@ -57,6 +68,7 @@ int addAnimatedTransform(Target& target, double duration, int deltaX, int deltaY
|
|
|
| WebKit::WebTransformOperations operations;
|
| operations.appendTranslate(deltaX, deltaY, 0);
|
| +#endif
|
| curve->addKeyframe(TransformKeyframe::create(duration, operations, scoped_ptr<cc::TimingFunction>()));
|
|
|
| int id = nextAnimationId++;
|
|
|