Index: Source/core/animation/Interpolation.h |
diff --git a/Source/core/animation/Interpolation.h b/Source/core/animation/Interpolation.h |
index 88f49f15d8fdf6b89d2c699e65d713f8a9c3e446..8b399d50f20304f4424ca48c3dfa5b5c12b347eb 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; } |
+ |
virtual bool isStyleInterpolation() const { return false; } |
virtual bool isLegacyStyleInterpolation() const { return false; } |
@@ -29,13 +41,20 @@ 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(); } |
@@ -46,6 +65,9 @@ private: |
friend class AnimationColorStyleInterpolationTest; |
}; |
+using InterpolationPipeline = WillBeHeapVector<RefPtrWillBeMember<Interpolation>>; |
+using InterpolationPipelineMap = WillBeHeapHashMap<CSSPropertyID, InterpolationPipeline>; |
alancutter (OOO until 2018)
2015/02/17 03:50:56
I'm a bit iffy about having InterpolationPipelineM
|
+ |
} // namespace blink |
#endif // Interpolation_h |