| Index: cc/test/CCAnimationTestCommon.cpp
|
| diff --git a/cc/test/CCAnimationTestCommon.cpp b/cc/test/CCAnimationTestCommon.cpp
|
| index 6b7801ce28b3139a6f8c585774cd56b8ef3ec94b..884b9fe5a82de0d55beb495e822f00595c4dc25a 100644
|
| --- a/cc/test/CCAnimationTestCommon.cpp
|
| +++ b/cc/test/CCAnimationTestCommon.cpp
|
| @@ -19,38 +19,38 @@ namespace {
|
| template <class Target>
|
| void addOpacityTransition(Target& target, double duration, float startOpacity, float endOpacity, bool useTimingFunction)
|
| {
|
| - OwnPtr<CCKeyframedFloatAnimationCurve> curve(CCKeyframedFloatAnimationCurve::create());
|
| + scoped_ptr<CCKeyframedFloatAnimationCurve> curve(CCKeyframedFloatAnimationCurve::create());
|
|
|
| if (duration > 0)
|
| - curve->addKeyframe(CCFloatKeyframe::create(0, startOpacity, useTimingFunction ? nullptr : CCEaseTimingFunction::create()));
|
| - curve->addKeyframe(CCFloatKeyframe::create(duration, endOpacity, nullptr));
|
| + curve->addKeyframe(CCFloatKeyframe::create(0, startOpacity, useTimingFunction ? scoped_ptr<CCTimingFunction>(): CCEaseTimingFunction::create()));
|
| + curve->addKeyframe(CCFloatKeyframe::create(duration, endOpacity, scoped_ptr<cc::CCTimingFunction>()));
|
|
|
| - OwnPtr<CCActiveAnimation> animation(CCActiveAnimation::create(curve.release(), 0, 0, CCActiveAnimation::Opacity));
|
| + scoped_ptr<CCActiveAnimation> animation(CCActiveAnimation::create(curve.PassAs<CCAnimationCurve>(), 0, 0, CCActiveAnimation::Opacity));
|
| animation->setNeedsSynchronizedStartTime(true);
|
|
|
| - target.addAnimation(animation.release());
|
| + target.addAnimation(animation.Pass());
|
| }
|
|
|
| template <class Target>
|
| void addAnimatedTransform(Target& target, double duration, int deltaX, int deltaY)
|
| {
|
| static int id = 0;
|
| - OwnPtr<CCKeyframedTransformAnimationCurve> curve(CCKeyframedTransformAnimationCurve::create());
|
| + scoped_ptr<CCKeyframedTransformAnimationCurve> curve(CCKeyframedTransformAnimationCurve::create());
|
|
|
| if (duration > 0) {
|
| WebKit::WebTransformOperations startOperations;
|
| startOperations.appendTranslate(deltaX, deltaY, 0);
|
| - curve->addKeyframe(CCTransformKeyframe::create(0, startOperations, nullptr));
|
| + curve->addKeyframe(CCTransformKeyframe::create(0, startOperations, scoped_ptr<cc::CCTimingFunction>()));
|
| }
|
|
|
| WebKit::WebTransformOperations operations;
|
| operations.appendTranslate(deltaX, deltaY, 0);
|
| - curve->addKeyframe(CCTransformKeyframe::create(duration, operations, nullptr));
|
| + curve->addKeyframe(CCTransformKeyframe::create(duration, operations, scoped_ptr<cc::CCTimingFunction>()));
|
|
|
| - OwnPtr<CCActiveAnimation> animation(CCActiveAnimation::create(curve.release(), id++, 0, CCActiveAnimation::Transform));
|
| + scoped_ptr<CCActiveAnimation> animation(CCActiveAnimation::create(curve.PassAs<CCAnimationCurve>(), id++, 0, CCActiveAnimation::Transform));
|
| animation->setNeedsSynchronizedStartTime(true);
|
|
|
| - target.addAnimation(animation.release());
|
| + target.addAnimation(animation.Pass());
|
| }
|
|
|
| } // namespace
|
| @@ -81,9 +81,9 @@ float FakeFloatAnimationCurve::getValue(double now) const
|
| return 0;
|
| }
|
|
|
| -PassOwnPtr<cc::CCAnimationCurve> FakeFloatAnimationCurve::clone() const
|
| +scoped_ptr<cc::CCAnimationCurve> FakeFloatAnimationCurve::clone() const
|
| {
|
| - return adoptPtr(new FakeFloatAnimationCurve);
|
| + return make_scoped_ptr(new FakeFloatAnimationCurve).PassAs<cc::CCAnimationCurve>();
|
| }
|
|
|
| FakeTransformTransition::FakeTransformTransition(double duration)
|
| @@ -105,9 +105,9 @@ WebKit::WebTransformationMatrix FakeTransformTransition::getValue(double time) c
|
| return WebKit::WebTransformationMatrix();
|
| }
|
|
|
| -PassOwnPtr<cc::CCAnimationCurve> FakeTransformTransition::clone() const
|
| +scoped_ptr<cc::CCAnimationCurve> FakeTransformTransition::clone() const
|
| {
|
| - return adoptPtr(new FakeTransformTransition(*this));
|
| + return make_scoped_ptr(new FakeTransformTransition(*this)).PassAs<cc::CCAnimationCurve>();
|
| }
|
|
|
|
|
| @@ -169,9 +169,9 @@ const WebKit::WebTransformationMatrix& FakeLayerAnimationControllerClient::trans
|
| return m_transform;
|
| }
|
|
|
| -PassOwnPtr<cc::CCAnimationCurve> FakeFloatTransition::clone() const
|
| +scoped_ptr<cc::CCAnimationCurve> FakeFloatTransition::clone() const
|
| {
|
| - return adoptPtr(new FakeFloatTransition(*this));
|
| + return make_scoped_ptr(new FakeFloatTransition(*this)).PassAs<cc::CCAnimationCurve>();
|
| }
|
|
|
| void addOpacityTransitionToController(cc::CCLayerAnimationController& controller, double duration, float startOpacity, float endOpacity, bool useTimingFunction)
|
|
|