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

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

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
« no previous file with comments | « third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.cpp
diff --git a/third_party/WebKit/Source/core/animation/Interpolation.cpp b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.cpp
similarity index 75%
rename from third_party/WebKit/Source/core/animation/Interpolation.cpp
rename to third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.cpp
index fce255ae4397fb5028ea4a46304da3913dec4b62..452696ca2285e4d3fe63bff301374039176153bd 100644
--- a/third_party/WebKit/Source/core/animation/Interpolation.cpp
+++ b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.cpp
@@ -1,8 +1,8 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "core/animation/Interpolation.h"
+#include "core/animation/LegacyStyleInterpolation.h"
#include <memory>
@@ -34,19 +34,21 @@ bool typesMatch(const InterpolableValue* start, const InterpolableValue* end) {
} // namespace
-Interpolation::Interpolation(std::unique_ptr<InterpolableValue> start,
- std::unique_ptr<InterpolableValue> end)
- : m_start(std::move(start)),
+LegacyStyleInterpolation::LegacyStyleInterpolation(
+ std::unique_ptr<InterpolableValue> start,
+ std::unique_ptr<InterpolableValue> end,
+ CSSPropertyID id)
+ : Interpolation(),
+ m_start(std::move(start)),
m_end(std::move(end)),
+ m_id(id),
m_cachedFraction(0),
m_cachedIteration(0),
m_cachedValue(m_start ? m_start->clone() : nullptr) {
RELEASE_ASSERT(typesMatch(m_start.get(), m_end.get()));
}
-Interpolation::~Interpolation() {}
-
-void Interpolation::interpolate(int iteration, double fraction) {
+void LegacyStyleInterpolation::interpolate(int iteration, double fraction) {
if (m_cachedFraction != fraction || m_cachedIteration != iteration) {
m_start->interpolate(*m_end, fraction, *m_cachedValue);
m_cachedIteration = iteration;
« no previous file with comments | « third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698