| 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 PairwiseInterpolationValue_h | 5 #ifndef PairwiseInterpolationValue_h |
| 6 #define PairwiseInterpolationValue_h | 6 #define PairwiseInterpolationValue_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 // Represents the smooth interpolation between an adjacent pair of PropertySpeci
ficKeyframes. | 14 // Represents the smooth interpolation between an adjacent pair of PropertySpeci
ficKeyframes. |
| 15 struct PairwiseInterpolationValue { | 15 struct PairwiseInterpolationValue { |
| 16 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 16 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 17 | 17 |
| 18 PairwiseInterpolationValue(PassOwnPtr<InterpolableValue> startInterpolableVa
lue, PassOwnPtr<InterpolableValue> endInterpolableValue, PassRefPtr<NonInterpola
bleValue> nonInterpolableValue = nullptr) | 18 PairwiseInterpolationValue(PassOwnPtr<InterpolableValue> startInterpolableVa
lue, PassOwnPtr<InterpolableValue> endInterpolableValue, PassRefPtr<NonInterpola
bleValue> nonInterpolableValue = nullptr) |
| 19 : startInterpolableValue(std::move(startInterpolableValue)) | 19 : startInterpolableValue(std::move(startInterpolableValue)) |
| 20 , endInterpolableValue(std::move(endInterpolableValue)) | 20 , endInterpolableValue(std::move(endInterpolableValue)) |
| 21 , nonInterpolableValue(std::move(nonInterpolableValue)) | 21 , nonInterpolableValue(std::move(nonInterpolableValue)) |
| 22 { } | 22 { } |
| 23 | 23 |
| 24 PairwiseInterpolationValue(std::nullptr_t) { } | 24 PairwiseInterpolationValue(std::nullptr_t) { } |
| 25 | 25 |
| 26 PairwiseInterpolationValue(PairwiseInterpolationValue&& other) | 26 PairwiseInterpolationValue(PairwiseInterpolationValue&& other) |
| 27 : startInterpolableValue(other.startInterpolableValue.release()) | 27 : startInterpolableValue(std::move(other.startInterpolableValue)) |
| 28 , endInterpolableValue(other.endInterpolableValue.release()) | 28 , endInterpolableValue(std::move(other.endInterpolableValue)) |
| 29 , nonInterpolableValue(other.nonInterpolableValue.release()) | 29 , nonInterpolableValue(other.nonInterpolableValue.release()) |
| 30 { } | 30 { } |
| 31 | 31 |
| 32 operator bool() const { return startInterpolableValue.get(); } | 32 operator bool() const { return startInterpolableValue.get(); } |
| 33 | 33 |
| 34 OwnPtr<InterpolableValue> startInterpolableValue; | 34 OwnPtr<InterpolableValue> startInterpolableValue; |
| 35 OwnPtr<InterpolableValue> endInterpolableValue; | 35 OwnPtr<InterpolableValue> endInterpolableValue; |
| 36 RefPtr<NonInterpolableValue> nonInterpolableValue; | 36 RefPtr<NonInterpolableValue> nonInterpolableValue; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace blink | 39 } // namespace blink |
| 40 | 40 |
| 41 #endif // PairwiseInterpolationValue_h | 41 #endif // PairwiseInterpolationValue_h |
| OLD | NEW |