| 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, this function should not be used |
| 162 // when there can be intermediate 3d transforms but the end result is a |
| 163 // translation. |
| 161 bool ComputeTranslation(int source_id, | 164 bool ComputeTranslation(int source_id, |
| 162 int dest_id, | 165 int dest_id, |
| 163 gfx::Transform* transform) const; | 166 gfx::Transform* transform) const; |
| 164 | 167 |
| 165 void ResetChangeTracking(); | 168 void ResetChangeTracking(); |
| 166 // Updates the parent, target, and screen space transforms and snapping. | 169 // Updates the parent, target, and screen space transforms and snapping. |
| 167 void UpdateTransforms(int id); | 170 void UpdateTransforms(int id); |
| 168 void UpdateTransformChanged(TransformNode* node, | 171 void UpdateTransformChanged(TransformNode* node, |
| 169 TransformNode* parent_node, | 172 TransformNode* parent_node, |
| 170 TransformNode* source_node); | 173 TransformNode* source_node); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 gfx::Vector2dF inner_viewport_container_bounds_delta_; | 609 gfx::Vector2dF inner_viewport_container_bounds_delta_; |
| 607 gfx::Vector2dF outer_viewport_container_bounds_delta_; | 610 gfx::Vector2dF outer_viewport_container_bounds_delta_; |
| 608 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; | 611 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; |
| 609 | 612 |
| 610 PropertyTreesCachedData cached_data_; | 613 PropertyTreesCachedData cached_data_; |
| 611 }; | 614 }; |
| 612 | 615 |
| 613 } // namespace cc | 616 } // namespace cc |
| 614 | 617 |
| 615 #endif // CC_TREES_PROPERTY_TREE_H_ | 618 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |