Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.h |
| diff --git a/third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.h b/third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.h |
| index 040231b2056055dac98c6f1bac04d8c341b51ed0..20455df80b518f7435ef67e2916f38319482181a 100644 |
| --- a/third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.h |
| +++ b/third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.h |
| @@ -34,15 +34,23 @@ public: |
| private: |
| InvalidatableStyleInterpolation( |
| - const Vector<const InterpolationType*>& InterpolationTypes, |
| + const Vector<const InterpolationType*>& interpolationTypes, |
| const CSSPropertySpecificKeyframe& startKeyframe, |
| - const CSSPropertySpecificKeyframe& endKeyframe); |
| + const CSSPropertySpecificKeyframe& endKeyframe) |
| + : StyleInterpolation(nullptr, nullptr, interpolationTypes.first()->property()) |
| + , m_interpolationTypes(interpolationTypes) |
| + , m_startKeyframe(&startKeyframe) |
| + , m_endKeyframe(&endKeyframe) |
| + , m_currentFraction(std::numeric_limits<double>::quiet_NaN()) |
| + , m_isCachePending(true) |
|
dstockwell
2015/10/02 03:55:58
Perhaps invert this, m_isCached?
alancutter (OOO until 2018)
2015/10/08 05:18:49
Done.
|
| + { } |
| PassOwnPtr<InterpolationValue> maybeConvertUnderlyingValue(const StyleResolverState&) const; |
| const InterpolationValue* ensureValidInterpolation(const StyleResolverState&, const UnderlyingValue&) const; |
| + void clearCache() const; |
| bool isCacheValid(const StyleResolverState&, const UnderlyingValue&) const; |
| bool isNeutralKeyframeActive() const; |
| - bool maybeCachePairwiseConversion(const StyleResolverState*, const UnderlyingValue&) const; |
| + PassOwnPtr<PairwisePrimitiveInterpolation> maybeConvertPairwise(const StyleResolverState*, const UnderlyingValue&) const; |
| PassOwnPtr<InterpolationValue> convertSingleKeyframe(const CSSPropertySpecificKeyframe&, const StyleResolverState&, const UnderlyingValue&) const; |
| void setFlagIfInheritUsed(StyleResolverState&) const; |
| double underlyingFraction() const; |
| @@ -51,7 +59,8 @@ private: |
| const CSSPropertySpecificKeyframe* m_startKeyframe; |
| const CSSPropertySpecificKeyframe* m_endKeyframe; |
| double m_currentFraction; |
| - mutable OwnPtr<PrimitiveInterpolation> m_cachedConversion; |
| + mutable bool m_isCachePending; |
| + mutable OwnPtr<PrimitiveInterpolation> m_cachedPairConversion; |
| mutable InterpolationType::ConversionCheckers m_conversionCheckers; |
| mutable OwnPtr<InterpolationValue> m_cachedValue; |
| }; |