| Index: Source/core/svg/SVGPathBlender.cpp
|
| diff --git a/Source/core/svg/SVGPathBlender.cpp b/Source/core/svg/SVGPathBlender.cpp
|
| index 8a9d13fb9ee7caacdfd00ea51d2bdb66d27adf53..a584d79e86125a06521a78f430a5b9712376fbb6 100644
|
| --- a/Source/core/svg/SVGPathBlender.cpp
|
| +++ b/Source/core/svg/SVGPathBlender.cpp
|
| @@ -27,14 +27,17 @@
|
|
|
| namespace blink {
|
|
|
| -SVGPathBlender::SVGPathBlender()
|
| - : m_fromSource(nullptr)
|
| - , m_toSource(nullptr)
|
| - , m_consumer(nullptr)
|
| +SVGPathBlender::SVGPathBlender(SVGPathSource* fromSource, SVGPathSource* toSource, SVGPathConsumer* consumer)
|
| + : m_fromSource(fromSource)
|
| + , m_toSource(toSource)
|
| + , m_consumer(consumer)
|
| , m_progress(0)
|
| , m_addTypesCount(0)
|
| , m_isInFirstHalfOfAnimation(false)
|
| {
|
| + ASSERT(m_fromSource);
|
| + ASSERT(m_toSource);
|
| + ASSERT(m_consumer);
|
| }
|
|
|
| void SVGPathBlender::trace(Visitor* visitor)
|
| @@ -303,20 +306,14 @@ static inline bool isSegmentEqual(const SVGPathSegType& fromType, const SVGPathS
|
| return to == from - 1;
|
| }
|
|
|
| -bool SVGPathBlender::addAnimatedPath(SVGPathSource* fromSource, SVGPathSource* toSource, SVGPathConsumer* consumer, unsigned repeatCount)
|
| +bool SVGPathBlender::addAnimatedPath(unsigned repeatCount)
|
| {
|
| TemporaryChange<unsigned> change(m_addTypesCount, repeatCount);
|
| - return blendAnimatedPath(0, fromSource, toSource, consumer);
|
| + return blendAnimatedPath(0);
|
| }
|
|
|
| -bool SVGPathBlender::blendAnimatedPath(float progress, SVGPathSource* fromSource, SVGPathSource* toSource, SVGPathConsumer* consumer)
|
| +bool SVGPathBlender::blendAnimatedPath(float progress)
|
| {
|
| - ASSERT(fromSource);
|
| - ASSERT(toSource);
|
| - ASSERT(consumer);
|
| - m_fromSource = fromSource;
|
| - m_toSource = toSource;
|
| - m_consumer = consumer;
|
| m_isInFirstHalfOfAnimation = progress < 0.5f;
|
| m_progress = progress;
|
|
|
| @@ -399,18 +396,4 @@ bool SVGPathBlender::blendAnimatedPath(float progress, SVGPathSource* fromSource
|
| return true;
|
| }
|
|
|
| -void SVGPathBlender::cleanup()
|
| -{
|
| - ASSERT(m_toSource);
|
| - ASSERT(m_fromSource);
|
| - ASSERT(m_consumer);
|
| -
|
| - m_consumer->cleanup();
|
| - m_toSource = nullptr;
|
| - m_fromSource = nullptr;
|
| - m_consumer = nullptr;
|
| - m_fromCurrentPoint = FloatPoint();
|
| - m_toCurrentPoint = FloatPoint();
|
| -}
|
| -
|
| }
|
|
|