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

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

Issue 2619173002: Remove most content from Interpolation (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
diff --git a/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
index ef9d80c5d4bd48cc2f84b20fadb267d74d49ad8b..0947a3c1b327267e14daea6ee1aa61c23e4441f3 100644
--- a/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
+++ b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
@@ -48,13 +48,25 @@ class CORE_EXPORT LegacyStyleInterpolation : public Interpolation {
PropertyHandle getProperty() const final { return PropertyHandle(id()); }
- private:
- CSSPropertyID m_id;
+ void interpolate(int iteration, double fraction) final;
+ protected:
LegacyStyleInterpolation(std::unique_ptr<InterpolableValue> start,
std::unique_ptr<InterpolableValue> end,
- CSSPropertyID id)
- : Interpolation(std::move(start), std::move(end)), m_id(id) {}
+ CSSPropertyID);
+
+ private:
+ const std::unique_ptr<InterpolableValue> m_start;
+ const std::unique_ptr<InterpolableValue> m_end;
+ CSSPropertyID m_id;
+
+ mutable double m_cachedFraction;
+ mutable int m_cachedIteration;
+ mutable std::unique_ptr<InterpolableValue> m_cachedValue;
+
+ InterpolableValue* getCachedValueForTesting() const final {
+ return m_cachedValue.get();
+ }
};
DEFINE_TYPE_CASTS(LegacyStyleInterpolation,

Powered by Google App Engine
This is Rietveld 408576698