Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.h

Issue 1379263002: Don't use pairwise keyframe interpolation at fractions 0 and 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_listInterpolationFunctions
Patch Set: Rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5f14c4dd5c6e109478c7f5428a212b019a403c34..f9c174b1bd94374deb481727219d6eb8516bd48b 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_isCached(false)
+ { }
PassOwnPtr<InterpolationValue> maybeConvertUnderlyingValue(const StyleResolverState&) const;
const InterpolationValue* ensureValidInterpolation(const StyleResolverState&, const InterpolationValue* underlyingValue) const;
+ void clearCache() const;
bool isCacheValid(const StyleResolverState&, const InterpolationValue* underlyingValue) const;
bool isNeutralKeyframeActive() const;
- bool maybeCachePairwiseConversion(const StyleResolverState*, const InterpolationValue* underlyingValue) const;
+ PassOwnPtr<PairwisePrimitiveInterpolation> maybeConvertPairwise(const StyleResolverState*, const InterpolationValue* underlyingValue) const;
PassOwnPtr<InterpolationValue> convertSingleKeyframe(const CSSPropertySpecificKeyframe&, const StyleResolverState&, const InterpolationValue* 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_isCached;
+ mutable OwnPtr<PrimitiveInterpolation> m_cachedPairConversion;
mutable InterpolationType::ConversionCheckers m_conversionCheckers;
mutable OwnPtr<InterpolationValue> m_cachedValue;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/InvalidatableStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698