| 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 InterpolationValue_h | 5 #ifndef InterpolationValue_h |
| 6 #define InterpolationValue_h | 6 #define InterpolationValue_h |
| 7 | 7 |
| 8 #include "core/animation/InterpolableValue.h" | 8 #include "core/animation/InterpolableValue.h" |
| 9 #include "core/animation/NonInterpolableValue.h" | 9 #include "core/animation/NonInterpolableValue.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class InterpolationType; | 14 class InterpolationType; |
| 15 | 15 |
| 16 struct InterpolationComponentValue { | 16 struct InterpolationComponentValue { |
| 17 ALLOW_ONLY_INLINE_ALLOCATION(); | 17 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 18 | 18 |
| 19 InterpolationComponentValue(PassOwnPtr<InterpolableValue> interpolableValue
= nullptr, PassRefPtr<NonInterpolableValue> nonInterpolableValue = nullptr) | 19 InterpolationComponentValue(PassOwnPtr<InterpolableValue> interpolableValue
= nullptr, PassRefPtrWillBeRawPtr<NonInterpolableValue> nonInterpolableValue = n
ullptr) |
| 20 : interpolableValue(interpolableValue) | 20 : interpolableValue(interpolableValue) |
| 21 , nonInterpolableValue(nonInterpolableValue) | 21 , nonInterpolableValue(nonInterpolableValue) |
| 22 { } | 22 { } |
| 23 | 23 |
| 24 OwnPtr<InterpolableValue> interpolableValue; | 24 OwnPtr<InterpolableValue> interpolableValue; |
| 25 RefPtr<NonInterpolableValue> nonInterpolableValue; | 25 RefPtrWillBePersistent<NonInterpolableValue> nonInterpolableValue; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 class InterpolationValue { | 28 class InterpolationValue { |
| 29 public: | 29 public: |
| 30 static PassOwnPtr<InterpolationValue> create(const InterpolationType& type,
PassOwnPtr<InterpolableValue> interpolableValue, PassRefPtrWillBeRawPtr<NonInter
polableValue> nonInterpolableValue = nullptr) | 30 static PassOwnPtr<InterpolationValue> create(const InterpolationType& type,
PassOwnPtr<InterpolableValue> interpolableValue, PassRefPtrWillBeRawPtr<NonInter
polableValue> nonInterpolableValue = nullptr) |
| 31 { | 31 { |
| 32 return adoptPtr(new InterpolationValue(type, interpolableValue, nonInter
polableValue)); | 32 return adoptPtr(new InterpolationValue(type, interpolableValue, nonInter
polableValue)); |
| 33 } | 33 } |
| 34 | 34 |
| 35 PassOwnPtr<InterpolationValue> clone() const | 35 PassOwnPtr<InterpolationValue> clone() const |
| (...skipping 15 matching lines...) Expand all Loading... |
| 51 ASSERT(m_component.interpolableValue); | 51 ASSERT(m_component.interpolableValue); |
| 52 } | 52 } |
| 53 | 53 |
| 54 const InterpolationType& m_type; | 54 const InterpolationType& m_type; |
| 55 InterpolationComponentValue m_component; | 55 InterpolationComponentValue m_component; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace blink | 58 } // namespace blink |
| 59 | 59 |
| 60 #endif // InterpolationValue_h | 60 #endif // InterpolationValue_h |
| OLD | NEW |