| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TREES_PROPERTY_TREE_H_ | 5 #ifndef CC_TREES_PROPERTY_TREE_H_ |
| 6 #define CC_TREES_PROPERTY_TREE_H_ | 6 #define CC_TREES_PROPERTY_TREE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 bool Are2DAxisAligned(int source_id, int dest_id) const; | 158 bool Are2DAxisAligned(int source_id, int dest_id) const; |
| 159 | 159 |
| 160 // Updates the parent, target, and screen space transforms and snapping. | 160 // Updates the parent, target, and screen space transforms and snapping. |
| 161 void UpdateTransforms(int id); | 161 void UpdateTransforms(int id); |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 // Returns true iff the node at |desc_id| is a descendant of the node at | 164 // Returns true iff the node at |desc_id| is a descendant of the node at |
| 165 // |anc_id|. | 165 // |anc_id|. |
| 166 bool IsDescendant(int desc_id, int anc_id) const; | 166 bool IsDescendant(int desc_id, int anc_id) const; |
| 167 | 167 |
| 168 // Returns the index of the lowest common ancestor of the nodes |a| and |b|. | |
| 169 int LowestCommonAncestor(int a, int b) const; | |
| 170 | |
| 171 // Computes the combined transform between |source_id| and |dest_id| and | 168 // Computes the combined transform between |source_id| and |dest_id| and |
| 172 // returns false if the inverse of a singular transform was used. These two | 169 // returns false if the inverse of a singular transform was used. These two |
| 173 // nodes must be on the same ancestor chain. | 170 // nodes must be on the same ancestor chain. |
| 174 bool CombineTransformsBetween(int source_id, | 171 bool CombineTransformsBetween(int source_id, |
| 175 int dest_id, | 172 int dest_id, |
| 176 gfx::Transform* transform) const; | 173 gfx::Transform* transform) const; |
| 177 | 174 |
| 178 // Computes the combined inverse transform between |source_id| and |dest_id| | 175 // Computes the combined inverse transform between |source_id| and |dest_id| |
| 179 // and returns false if the inverse of a singular transform was used. These | 176 // and returns false if the inverse of a singular transform was used. These |
| 180 // two nodes must be on the same ancestor chain. | 177 // two nodes must be on the same ancestor chain. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 193 void UpdateSnapping(TransformNode* node); | 190 void UpdateSnapping(TransformNode* node); |
| 194 }; | 191 }; |
| 195 | 192 |
| 196 class CC_EXPORT ClipTree final : public PropertyTree<ClipNode> {}; | 193 class CC_EXPORT ClipTree final : public PropertyTree<ClipNode> {}; |
| 197 | 194 |
| 198 class CC_EXPORT OpacityTree final : public PropertyTree<OpacityNode> {}; | 195 class CC_EXPORT OpacityTree final : public PropertyTree<OpacityNode> {}; |
| 199 | 196 |
| 200 } // namespace cc | 197 } // namespace cc |
| 201 | 198 |
| 202 #endif // CC_TREES_PROPERTY_TREE_H_ | 199 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |