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

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

Issue 2555923003: Make InvalidatableInterpolation's InterpolationTypes decided at effect application time (Closed)
Patch Set: Extended InterpolationTypesMap lifetime scope to fix release crash Created 4 years 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: third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h
diff --git a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h
index 1763d4648e7db27612ba0319e382fc8aa55a1147..c45d3a08977d988465175d0fa2f52d627f1635a8 100644
--- a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h
+++ b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h
@@ -6,8 +6,8 @@
#define InvalidatableInterpolation_h
#include "core/animation/InterpolationType.h"
+#include "core/animation/InterpolationTypesMap.h"
#include "core/animation/PrimitiveInterpolation.h"
-#include "core/animation/PropertyInterpolationTypesMapping.h"
#include "core/animation/StyleInterpolation.h"
#include "core/animation/TypedInterpolationValue.h"
#include <memory>
@@ -21,12 +21,10 @@ class CORE_EXPORT InvalidatableInterpolation : public Interpolation {
public:
static PassRefPtr<InvalidatableInterpolation> create(
PropertyHandle property,
- const InterpolationTypes& interpolationTypes,
PassRefPtr<PropertySpecificKeyframe> startKeyframe,
PassRefPtr<PropertySpecificKeyframe> endKeyframe) {
- return adoptRef(new InvalidatableInterpolation(property, interpolationTypes,
- std::move(startKeyframe),
- std::move(endKeyframe)));
+ return adoptRef(new InvalidatableInterpolation(
+ property, std::move(startKeyframe), std::move(endKeyframe)));
}
PropertyHandle getProperty() const final { return m_property; }
@@ -40,12 +38,12 @@ class CORE_EXPORT InvalidatableInterpolation : public Interpolation {
private:
InvalidatableInterpolation(PropertyHandle property,
- const InterpolationTypes& interpolationTypes,
PassRefPtr<PropertySpecificKeyframe> startKeyframe,
PassRefPtr<PropertySpecificKeyframe> endKeyframe)
: Interpolation(nullptr, nullptr),
m_property(property),
- m_interpolationTypes(interpolationTypes),
+ m_interpolationTypes(nullptr),
+ m_interpolationTypesVersion(0),
m_startKeyframe(startKeyframe),
m_endKeyframe(endKeyframe),
m_currentFraction(std::numeric_limits<double>::quiet_NaN()),
@@ -58,6 +56,7 @@ class CORE_EXPORT InvalidatableInterpolation : public Interpolation {
const TypedInterpolationValue* ensureValidConversion(
const InterpolationEnvironment&,
const UnderlyingValueOwner&) const;
+ void ensureValidInterpolationTypes(const InterpolationEnvironment&) const;
void clearConversionCache() const;
bool isConversionCacheValid(const InterpolationEnvironment&,
const UnderlyingValueOwner&) const;
@@ -75,7 +74,8 @@ class CORE_EXPORT InvalidatableInterpolation : public Interpolation {
double underlyingFraction() const;
const PropertyHandle m_property;
- const InterpolationTypes& m_interpolationTypes;
+ mutable const InterpolationTypes* m_interpolationTypes;
+ mutable size_t m_interpolationTypesVersion;
RefPtr<PropertySpecificKeyframe> m_startKeyframe;
RefPtr<PropertySpecificKeyframe> m_endKeyframe;
double m_currentFraction;

Powered by Google App Engine
This is Rietveld 408576698