OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_ANIMATION_TRANSFORM_OPERATIONS_H_ | 5 #ifndef CC_ANIMATION_TRANSFORM_OPERATIONS_H_ |
6 #define CC_ANIMATION_TRANSFORM_OPERATIONS_H_ | 6 #define CC_ANIMATION_TRANSFORM_OPERATIONS_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/logging.h" | 11 #include "base/logging.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "cc/animation/transform_operation.h" | 13 #include "cc/animation/transform_operation.h" |
14 #include "cc/base/cc_export.h" | 14 #include "cc/base/cc_export.h" |
15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
16 | 16 |
17 namespace gfx { | 17 namespace gfx { |
18 class BoxF; | 18 class BoxF; |
19 struct DecomposedTransform; | 19 struct DecomposedTransform; |
20 } | 20 } |
21 | 21 |
22 namespace cc { | 22 namespace cc { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 private: | 101 private: |
102 bool BlendInternal(const TransformOperations& from, | 102 bool BlendInternal(const TransformOperations& from, |
103 SkMScalar progress, | 103 SkMScalar progress, |
104 gfx::Transform* result) const; | 104 gfx::Transform* result) const; |
105 | 105 |
106 std::vector<TransformOperation> operations_; | 106 std::vector<TransformOperation> operations_; |
107 | 107 |
108 bool ComputeDecomposedTransform() const; | 108 bool ComputeDecomposedTransform() const; |
109 | 109 |
110 // For efficiency, we cache the decomposed transform. | 110 // For efficiency, we cache the decomposed transform. |
111 mutable scoped_ptr<gfx::DecomposedTransform> decomposed_transform_; | 111 mutable std::unique_ptr<gfx::DecomposedTransform> decomposed_transform_; |
112 mutable bool decomposed_transform_dirty_; | 112 mutable bool decomposed_transform_dirty_; |
113 | 113 |
114 DISALLOW_ASSIGN(TransformOperations); | 114 DISALLOW_ASSIGN(TransformOperations); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace cc | 117 } // namespace cc |
118 | 118 |
119 #endif // CC_ANIMATION_TRANSFORM_OPERATIONS_H_ | 119 #endif // CC_ANIMATION_TRANSFORM_OPERATIONS_H_ |
OLD | NEW |