Chromium Code Reviews| Index: Source/core/animation/Interpolation.h |
| diff --git a/Source/core/animation/Interpolation.h b/Source/core/animation/Interpolation.h |
| index 88f49f15d8fdf6b89d2c699e65d713f8a9c3e446..58c00d6f0d2252223fcad34e86edea912db7fea8 100644 |
| --- a/Source/core/animation/Interpolation.h |
| +++ b/Source/core/animation/Interpolation.h |
| @@ -5,6 +5,7 @@ |
| #ifndef Interpolation_h |
| #define Interpolation_h |
| +#include "core/animation/AnimationEffect.h" |
| #include "core/animation/InterpolableValue.h" |
| #include "platform/heap/Handle.h" |
| @@ -19,8 +20,19 @@ public: |
| virtual ~Interpolation(); |
| + static PassRefPtrWillBeRawPtr<Interpolation> create(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, |
| + AnimationEffect::CompositeOperation compositeStart, AnimationEffect::CompositeOperation compositeEnd) |
| + { |
| + return adoptRefWillBeNoop(new Interpolation(start, end, compositeStart, compositeEnd)); |
| + } |
| + |
| void interpolate(int iteration, double fraction) const; |
| + const InterpolableValue& cachedValue() const { return *m_cachedValue.get(); } |
| + double cachedUnderlyingFraction() const { return m_cachedUnderlyingFraction; } |
| + |
| + bool isReplaceOnly() const { return m_compositeStart == AnimationEffect::CompositeReplace && m_compositeEnd == AnimationEffect::CompositeReplace; } |
|
alancutter (OOO until 2018)
2015/02/12 05:55:45
We want to just check for UF == 0. Let's not have
|
| + |
| virtual bool isStyleInterpolation() const { return false; } |
| virtual bool isLegacyStyleInterpolation() const { return false; } |
| @@ -29,12 +41,18 @@ public: |
| protected: |
| const OwnPtrWillBeMember<InterpolableValue> m_start; |
| const OwnPtrWillBeMember<InterpolableValue> m_end; |
| + const AnimationEffect::CompositeOperation m_compositeStart; |
| + const AnimationEffect::CompositeOperation m_compositeEnd; |
| mutable double m_cachedFraction; |
| mutable int m_cachedIteration; |
| mutable OwnPtrWillBeMember<InterpolableValue> m_cachedValue; |
| + mutable double m_cachedUnderlyingFraction; |
| + // FIXME: Remove old constructor? |
| Interpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end); |
| + Interpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, |
| + AnimationEffect::CompositeOperation compositeStart, AnimationEffect::CompositeOperation compositeEnd); |
| private: |
| InterpolableValue* getCachedValueForTesting() const { return m_cachedValue.get(); } |