OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UnderlyingValueOwner_h | 5 #ifndef UnderlyingValueOwner_h |
6 #define UnderlyingValueOwner_h | 6 #define UnderlyingValueOwner_h |
7 | 7 |
| 8 #include <memory> |
8 #include "core/animation/TypedInterpolationValue.h" | 9 #include "core/animation/TypedInterpolationValue.h" |
9 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
10 #include "wtf/Noncopyable.h" | 11 #include "wtf/Noncopyable.h" |
11 #include <memory> | |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 // Handles memory management of underlying InterpolationValues in applyStack() | 15 // Handles memory management of underlying InterpolationValues in applyStack() |
16 // Ensures we perform copy on write if we are not the owner of an underlying | 16 // Ensures we perform copy on write if we are not the owner of an underlying |
17 // InterpolationValue. This functions similar to a DataRef except on | 17 // InterpolationValue. This functions similar to a DataRef except on |
18 // std::unique_ptr'd objects. | 18 // std::unique_ptr'd objects. |
19 class UnderlyingValueOwner { | 19 class UnderlyingValueOwner { |
20 WTF_MAKE_NONCOPYABLE(UnderlyingValueOwner); | 20 WTF_MAKE_NONCOPYABLE(UnderlyingValueOwner); |
21 STACK_ALLOCATED(); | 21 STACK_ALLOCATED(); |
(...skipping 24 matching lines...) Expand all Loading... |
46 | 46 |
47 private: | 47 private: |
48 const InterpolationType* m_type; | 48 const InterpolationType* m_type; |
49 InterpolationValue m_valueOwner; | 49 InterpolationValue m_valueOwner; |
50 const InterpolationValue* m_value; | 50 const InterpolationValue* m_value; |
51 }; | 51 }; |
52 | 52 |
53 } // namespace blink | 53 } // namespace blink |
54 | 54 |
55 #endif // UnderlyingValueOwner_h | 55 #endif // UnderlyingValueOwner_h |
OLD | NEW |