| 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 14 matching lines...) Expand all Loading... |
| 25 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; | 25 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; |
| 26 | 26 |
| 27 DEFINE_INLINE_VIRTUAL_TRACE() { } | 27 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 virtual void interpolate(const InterpolableValue& to, const double progress,
InterpolableValue& result) const = 0; | 30 virtual void interpolate(const InterpolableValue& to, const double progress,
InterpolableValue& result) const = 0; |
| 31 virtual void add(const InterpolableValue& rhs, InterpolableValue& result) co
nst = 0; | 31 virtual void add(const InterpolableValue& rhs, InterpolableValue& result) co
nst = 0; |
| 32 virtual void multiply(double scalar, InterpolableValue& result) const = 0; | 32 virtual void multiply(double scalar, InterpolableValue& result) const = 0; |
| 33 | 33 |
| 34 friend class Interpolation; | 34 friend class Interpolation; |
| 35 friend class PairwisePrimitiveInterpolation; |
| 35 | 36 |
| 36 // Keep interpolate private, but allow calls within the hierarchy without | 37 // Keep interpolate private, but allow calls within the hierarchy without |
| 37 // knowledge of type. | 38 // knowledge of type. |
| 38 friend class DeferredLegacyStyleInterpolation; | 39 friend class DeferredLegacyStyleInterpolation; |
| 39 friend class InterpolableNumber; | 40 friend class InterpolableNumber; |
| 40 friend class InterpolableBool; | 41 friend class InterpolableBool; |
| 41 friend class InterpolableList; | 42 friend class InterpolableList; |
| 42 | 43 |
| 43 friend class AnimationInterpolableValueTest; | 44 friend class AnimationInterpolableValueTest; |
| 44 }; | 45 }; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 }; | 177 }; |
| 177 | 178 |
| 178 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); | 179 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); |
| 179 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); | 180 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); |
| 180 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); | 181 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); |
| 181 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); | 182 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); |
| 182 | 183 |
| 183 } | 184 } |
| 184 | 185 |
| 185 #endif | 186 #endif |
| OLD | NEW |