| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sky/engine/config.h" | |
| 6 #include "sky/engine/core/animation/Interpolation.h" | 5 #include "sky/engine/core/animation/Interpolation.h" |
| 7 | 6 |
| 8 namespace blink { | 7 namespace blink { |
| 9 | 8 |
| 10 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Interpolation); | 9 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(Interpolation); |
| 11 | 10 |
| 12 namespace { | 11 namespace { |
| 13 | 12 |
| 14 bool typesMatch(const InterpolableValue* start, const InterpolableValue* end) | 13 bool typesMatch(const InterpolableValue* start, const InterpolableValue* end) |
| 15 { | 14 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void Interpolation::interpolate(int iteration, double fraction) const | 46 void Interpolation::interpolate(int iteration, double fraction) const |
| 48 { | 47 { |
| 49 if (m_cachedFraction != fraction || m_cachedIteration != iteration) { | 48 if (m_cachedFraction != fraction || m_cachedIteration != iteration) { |
| 50 m_cachedValue = m_start->interpolate(*m_end, fraction); | 49 m_cachedValue = m_start->interpolate(*m_end, fraction); |
| 51 m_cachedIteration = iteration; | 50 m_cachedIteration = iteration; |
| 52 m_cachedFraction = fraction; | 51 m_cachedFraction = fraction; |
| 53 } | 52 } |
| 54 } | 53 } |
| 55 | 54 |
| 56 } | 55 } |
| OLD | NEW |