| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // other id; then the nearest ancestor of node id1 whose id is smaller than | 150 // other id; then the nearest ancestor of node id1 whose id is smaller than |
| 151 // id2 is the lowest common ancestor of the pair of nodes, and the transform | 151 // id2 is the lowest common ancestor of the pair of nodes, and the transform |
| 152 // from this lowest common ancestor to node id2 is only a 2d translation. | 152 // from this lowest common ancestor to node id2 is only a 2d translation. |
| 153 bool ComputeTransform(int source_id, | 153 bool ComputeTransform(int source_id, |
| 154 int dest_id, | 154 int dest_id, |
| 155 gfx::Transform* transform) const; | 155 gfx::Transform* transform) const; |
| 156 | 156 |
| 157 // Computes the change of basis transform from node |source_id| to |dest_id|. | 157 // Computes the change of basis transform from node |source_id| to |dest_id|. |
| 158 // This is used by scroll children to compute transform from their scroll | 158 // This is used by scroll children to compute transform from their scroll |
| 159 // parent space (source) to their parent space (destination) and it can atmost | 159 // parent space (source) to their parent space (destination) and it can atmost |
| 160 // be a translation. | 160 // be a translation. This function assumes that the path from source to |
| 161 // destination has only translations. So, it should not be called when there |
| 162 // can be intermediate 3d transforms but the end result is a translation. |
| 161 bool ComputeTranslation(int source_id, | 163 bool ComputeTranslation(int source_id, |
| 162 int dest_id, | 164 int dest_id, |
| 163 gfx::Transform* transform) const; | 165 gfx::Transform* transform) const; |
| 164 | 166 |
| 165 void ResetChangeTracking(); | 167 void ResetChangeTracking(); |
| 166 // Updates the parent, target, and screen space transforms and snapping. | 168 // Updates the parent, target, and screen space transforms and snapping. |
| 167 void UpdateTransforms(int id); | 169 void UpdateTransforms(int id); |
| 168 void UpdateTransformChanged(TransformNode* node, | 170 void UpdateTransformChanged(TransformNode* node, |
| 169 TransformNode* parent_node, | 171 TransformNode* parent_node, |
| 170 TransformNode* source_node); | 172 TransformNode* source_node); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 gfx::Vector2dF inner_viewport_container_bounds_delta_; | 608 gfx::Vector2dF inner_viewport_container_bounds_delta_; |
| 607 gfx::Vector2dF outer_viewport_container_bounds_delta_; | 609 gfx::Vector2dF outer_viewport_container_bounds_delta_; |
| 608 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; | 610 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; |
| 609 | 611 |
| 610 PropertyTreesCachedData cached_data_; | 612 PropertyTreesCachedData cached_data_; |
| 611 }; | 613 }; |
| 612 | 614 |
| 613 } // namespace cc | 615 } // namespace cc |
| 614 | 616 |
| 615 #endif // CC_TREES_PROPERTY_TREE_H_ | 617 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |