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 #ifndef LegacyStyleInterpolation_h | 5 #ifndef LegacyStyleInterpolation_h |
6 #define LegacyStyleInterpolation_h | 6 #define LegacyStyleInterpolation_h |
7 | 7 |
8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/animation/Interpolation.h" | 10 #include "core/animation/Interpolation.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 private: | 58 private: |
59 const std::unique_ptr<InterpolableValue> m_start; | 59 const std::unique_ptr<InterpolableValue> m_start; |
60 const std::unique_ptr<InterpolableValue> m_end; | 60 const std::unique_ptr<InterpolableValue> m_end; |
61 CSSPropertyID m_id; | 61 CSSPropertyID m_id; |
62 | 62 |
63 mutable double m_cachedFraction; | 63 mutable double m_cachedFraction; |
64 mutable int m_cachedIteration; | 64 mutable int m_cachedIteration; |
65 mutable std::unique_ptr<InterpolableValue> m_cachedValue; | 65 mutable std::unique_ptr<InterpolableValue> m_cachedValue; |
66 | 66 |
67 InterpolableValue* getCachedValueForTesting() const final { | 67 InterpolableValue* getCachedValueForTesting() const { |
68 return m_cachedValue.get(); | 68 return m_cachedValue.get(); |
69 } | 69 } |
| 70 |
| 71 friend class AnimationInterpolableValueTest; |
| 72 friend class AnimationInterpolationEffectTest; |
70 }; | 73 }; |
71 | 74 |
72 DEFINE_TYPE_CASTS(LegacyStyleInterpolation, | 75 DEFINE_TYPE_CASTS(LegacyStyleInterpolation, |
73 Interpolation, | 76 Interpolation, |
74 value, | 77 value, |
75 value->isLegacyStyleInterpolation(), | 78 value->isLegacyStyleInterpolation(), |
76 value.isLegacyStyleInterpolation()); | 79 value.isLegacyStyleInterpolation()); |
77 | 80 |
78 } // namespace blink | 81 } // namespace blink |
79 | 82 |
80 #endif | 83 #endif |
OLD | NEW |