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

Unified Diff: Source/core/animation/InvalidatableStyleInterpolation.cpp

Issue 1214593003: Move AnimationValue onto the heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
Index: Source/core/animation/InvalidatableStyleInterpolation.cpp
diff --git a/Source/core/animation/InvalidatableStyleInterpolation.cpp b/Source/core/animation/InvalidatableStyleInterpolation.cpp
index 18ba3b6afe8fbb952a5bb3db7fd5b7cbae208467..9b3da9b7a3b1d3cf09c3c5c8d00813e26ba11859 100644
--- a/Source/core/animation/InvalidatableStyleInterpolation.cpp
+++ b/Source/core/animation/InvalidatableStyleInterpolation.cpp
@@ -27,8 +27,7 @@ bool InvalidatableStyleInterpolation::maybeCachePairwiseConversion(const StyleRe
for (const auto& animationType : m_animationTypes) {
OwnPtrWillBeRawPtr<PairwisePrimitiveInterpolation> pairwiseConversion = animationType->maybeConvertPairwise(m_startKeyframe, m_endKeyframe, state, m_conversionCheckers);
if (pairwiseConversion) {
- m_cachedValue.type = animationType;
- pairwiseConversion->initializeAnimationValue(m_cachedValue);
+ m_cachedValue = pairwiseConversion->initialValue();
m_cachedConversion = pairwiseConversion.release();
return true;
}
@@ -44,10 +43,10 @@ void InvalidatableStyleInterpolation::interpolate(int, double fraction)
// We defer the interpolation to ensureValidInterpolation() if m_cachedConversion is null.
}
-PassOwnPtrWillBeRawPtr<FlipPrimitiveInterpolation::Side> InvalidatableStyleInterpolation::convertSingleKeyframe(const CSSPropertySpecificKeyframe& keyframe, const StyleResolverState& state) const
+PassOwnPtrWillBeRawPtr<AnimationValue> InvalidatableStyleInterpolation::convertSingleKeyframe(const CSSPropertySpecificKeyframe& keyframe, const StyleResolverState& state) const
{
for (const auto& animationType : m_animationTypes) {
- OwnPtrWillBeRawPtr<FlipPrimitiveInterpolation::Side> result = animationType->maybeConvertSingle(keyframe, &state, m_conversionCheckers);
+ OwnPtrWillBeRawPtr<AnimationValue> result = animationType->maybeConvertSingle(keyframe, &state, m_conversionCheckers);
if (result)
return result.release();
}
@@ -80,7 +79,7 @@ void InvalidatableStyleInterpolation::ensureValidInterpolation(const StyleResolv
void InvalidatableStyleInterpolation::apply(StyleResolverState& state) const
{
ensureValidInterpolation(state);
- m_cachedValue.type->apply(*m_cachedValue.interpolableValue, m_cachedValue.nonInterpolableValue.get(), state);
+ m_cachedValue->type().apply(m_cachedValue->interpolableValue(), m_cachedValue->nonInterpolableValue(), state);
}
} // namespace blink
« no previous file with comments | « Source/core/animation/InvalidatableStyleInterpolation.h ('k') | Source/core/animation/PrimitiveInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698