| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef PrimitiveInterpolation_h | 5 #ifndef PrimitiveInterpolation_h |
| 6 #define PrimitiveInterpolation_h | 6 #define PrimitiveInterpolation_h |
| 7 | 7 |
| 8 #include "core/animation/TypedInterpolationValue.h" | 8 #include "core/animation/TypedInterpolationValue.h" |
| 9 #include "platform/animation/AnimationUtilities.h" | 9 #include "platform/animation/AnimationUtilities.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 PairwisePrimitiveInterpolation( | 64 PairwisePrimitiveInterpolation( |
| 65 const InterpolationType& type, | 65 const InterpolationType& type, |
| 66 std::unique_ptr<InterpolableValue> start, | 66 std::unique_ptr<InterpolableValue> start, |
| 67 std::unique_ptr<InterpolableValue> end, | 67 std::unique_ptr<InterpolableValue> end, |
| 68 PassRefPtr<NonInterpolableValue> nonInterpolableValue) | 68 PassRefPtr<NonInterpolableValue> nonInterpolableValue) |
| 69 : m_type(type), | 69 : m_type(type), |
| 70 m_start(std::move(start)), | 70 m_start(std::move(start)), |
| 71 m_end(std::move(end)), | 71 m_end(std::move(end)), |
| 72 m_nonInterpolableValue(nonInterpolableValue) { | 72 m_nonInterpolableValue(std::move(nonInterpolableValue)) { |
| 73 DCHECK(m_start); | 73 DCHECK(m_start); |
| 74 DCHECK(m_end); | 74 DCHECK(m_end); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void interpolateValue( | 77 void interpolateValue( |
| 78 double fraction, | 78 double fraction, |
| 79 std::unique_ptr<TypedInterpolationValue>& result) const final { | 79 std::unique_ptr<TypedInterpolationValue>& result) const final { |
| 80 DCHECK(result); | 80 DCHECK(result); |
| 81 DCHECK_EQ(&result->type(), &m_type); | 81 DCHECK_EQ(&result->type(), &m_type); |
| 82 DCHECK_EQ(result->getNonInterpolableValue(), m_nonInterpolableValue.get()); | 82 DCHECK_EQ(result->getNonInterpolableValue(), m_nonInterpolableValue.get()); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 bool isFlip() const final { return true; } | 137 bool isFlip() const final { return true; } |
| 138 | 138 |
| 139 std::unique_ptr<TypedInterpolationValue> m_start; | 139 std::unique_ptr<TypedInterpolationValue> m_start; |
| 140 std::unique_ptr<TypedInterpolationValue> m_end; | 140 std::unique_ptr<TypedInterpolationValue> m_end; |
| 141 mutable double m_lastFraction; | 141 mutable double m_lastFraction; |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace blink | 144 } // namespace blink |
| 145 | 145 |
| 146 #endif // PrimitiveInterpolation_h | 146 #endif // PrimitiveInterpolation_h |
| OLD | NEW |