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 <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Sets |bounds| be the bounding box for the region within which |box| will | 52 // Sets |bounds| be the bounding box for the region within which |box| will |
53 // exist when it is transformed by the result of calling Blend on |from| and | 53 // exist when it is transformed by the result of calling Blend on |from| and |
54 // with progress in the range [min_progress, max_progress]. If this region | 54 // with progress in the range [min_progress, max_progress]. If this region |
55 // cannot be computed, returns false. | 55 // cannot be computed, returns false. |
56 bool BlendedBoundsForBox(const gfx::BoxF& box, | 56 bool BlendedBoundsForBox(const gfx::BoxF& box, |
57 const TransformOperations& from, | 57 const TransformOperations& from, |
58 SkMScalar min_progress, | 58 SkMScalar min_progress, |
59 SkMScalar max_progress, | 59 SkMScalar max_progress, |
60 gfx::BoxF* bounds) const; | 60 gfx::BoxF* bounds) const; |
61 | 61 |
62 // Returns true if these operations affect scale. | |
63 bool AffectsScale() const; | |
64 | |
65 // Returns true if these operations are only translations. | 62 // Returns true if these operations are only translations. |
66 bool IsTranslation() const; | 63 bool IsTranslation() const; |
67 | 64 |
68 // Returns false if the operations affect 2d axis alignment. | 65 // Returns false if the operations affect 2d axis alignment. |
69 bool PreservesAxisAlignment() const; | 66 bool PreservesAxisAlignment() const; |
70 | 67 |
71 // Returns true if this operation and its descendants have the same types | 68 // Returns true if this operation and its descendants have the same types |
72 // as other and its descendants. | 69 // as other and its descendants. |
73 bool MatchesTypes(const TransformOperations& other) const; | 70 bool MatchesTypes(const TransformOperations& other) const; |
74 | 71 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // For efficiency, we cache the decomposed transform. | 107 // For efficiency, we cache the decomposed transform. |
111 mutable std::unique_ptr<gfx::DecomposedTransform> decomposed_transform_; | 108 mutable std::unique_ptr<gfx::DecomposedTransform> decomposed_transform_; |
112 mutable bool decomposed_transform_dirty_; | 109 mutable bool decomposed_transform_dirty_; |
113 | 110 |
114 DISALLOW_ASSIGN(TransformOperations); | 111 DISALLOW_ASSIGN(TransformOperations); |
115 }; | 112 }; |
116 | 113 |
117 } // namespace cc | 114 } // namespace cc |
118 | 115 |
119 #endif // CC_ANIMATION_TRANSFORM_OPERATIONS_H_ | 116 #endif // CC_ANIMATION_TRANSFORM_OPERATIONS_H_ |
OLD | NEW |