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 InterpolableValue_h | 5 #ifndef InterpolableValue_h |
6 #define InterpolableValue_h | 6 #define InterpolableValue_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/animation/animatable/AnimatableValue.h" | 9 #include "core/animation/animatable/AnimatableValue.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual std::unique_ptr<InterpolableValue> cloneAndZero() const = 0; | 32 virtual std::unique_ptr<InterpolableValue> cloneAndZero() const = 0; |
33 virtual void scale(double scale) = 0; | 33 virtual void scale(double scale) = 0; |
34 virtual void scaleAndAdd(double scale, const InterpolableValue& other) = 0; | 34 virtual void scaleAndAdd(double scale, const InterpolableValue& other) = 0; |
35 | 35 |
36 private: | 36 private: |
37 virtual void interpolate(const InterpolableValue& to, | 37 virtual void interpolate(const InterpolableValue& to, |
38 const double progress, | 38 const double progress, |
39 InterpolableValue& result) const = 0; | 39 InterpolableValue& result) const = 0; |
40 | 40 |
41 friend class LegacyStyleInterpolation; | 41 friend class LegacyStyleInterpolation; |
| 42 friend class TransitionInterpolation; |
42 friend class PairwisePrimitiveInterpolation; | 43 friend class PairwisePrimitiveInterpolation; |
43 | 44 |
44 // Keep interpolate private, but allow calls within the hierarchy without | 45 // Keep interpolate private, but allow calls within the hierarchy without |
45 // knowledge of type. | 46 // knowledge of type. |
46 friend class InterpolableNumber; | 47 friend class InterpolableNumber; |
47 friend class InterpolableBool; | 48 friend class InterpolableBool; |
48 friend class InterpolableList; | 49 friend class InterpolableList; |
49 | 50 |
50 friend class AnimationInterpolableValueTest; | 51 friend class AnimationInterpolableValueTest; |
51 }; | 52 }; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 value.isList()); | 179 value.isList()); |
179 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, | 180 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, |
180 InterpolableValue, | 181 InterpolableValue, |
181 value, | 182 value, |
182 value->isAnimatableValue(), | 183 value->isAnimatableValue(), |
183 value.isAnimatableValue()); | 184 value.isAnimatableValue()); |
184 | 185 |
185 } // namespace blink | 186 } // namespace blink |
186 | 187 |
187 #endif | 188 #endif |
OLD | NEW |