| 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 <unordered_map> | 10 #include <unordered_map> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 int source_node_id; | 101 int source_node_id; |
| 102 | 102 |
| 103 // This id determines which 3d rendering context the node is in. 0 is a | 103 // This id determines which 3d rendering context the node is in. 0 is a |
| 104 // special value and indicates that the node is not in any 3d rendering | 104 // special value and indicates that the node is not in any 3d rendering |
| 105 // context. | 105 // context. |
| 106 int sorting_context_id; | 106 int sorting_context_id; |
| 107 | 107 |
| 108 // TODO(vollick): will be moved when accelerated effects are implemented. | 108 // TODO(vollick): will be moved when accelerated effects are implemented. |
| 109 bool needs_local_transform_update : 1; | 109 bool needs_local_transform_update : 1; |
| 110 | 110 |
| 111 bool node_and_ancestors_are_animated_or_invertible : 1; |
| 112 |
| 111 bool is_invertible : 1; | 113 bool is_invertible : 1; |
| 112 bool ancestors_are_invertible : 1; | 114 bool ancestors_are_invertible : 1; |
| 113 | 115 |
| 114 bool is_animated : 1; | 116 bool is_animated : 1; |
| 115 bool to_screen_is_potentially_animated : 1; | 117 bool to_screen_is_potentially_animated : 1; |
| 116 bool has_only_translation_animations : 1; | 118 bool has_only_translation_animations : 1; |
| 117 bool to_screen_has_scale_animation : 1; | 119 bool to_screen_has_scale_animation : 1; |
| 118 | 120 |
| 119 // Flattening, when needed, is only applied to a node's inherited transform, | 121 // Flattening, when needed, is only applied to a node's inherited transform, |
| 120 // never to its local transform. | 122 // never to its local transform. |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 // Returns true iff the nodes indexed by |source_id| and |dest_id| are 2D axis | 416 // Returns true iff the nodes indexed by |source_id| and |dest_id| are 2D axis |
| 415 // aligned with respect to one another. | 417 // aligned with respect to one another. |
| 416 bool Are2DAxisAligned(int source_id, int dest_id) const; | 418 bool Are2DAxisAligned(int source_id, int dest_id) const; |
| 417 | 419 |
| 418 void ResetChangeTracking(); | 420 void ResetChangeTracking(); |
| 419 // Updates the parent, target, and screen space transforms and snapping. | 421 // Updates the parent, target, and screen space transforms and snapping. |
| 420 void UpdateTransforms(int id); | 422 void UpdateTransforms(int id); |
| 421 void UpdateTransformChanged(TransformNode* node, | 423 void UpdateTransformChanged(TransformNode* node, |
| 422 TransformNode* parent_node, | 424 TransformNode* parent_node, |
| 423 TransformNode* source_node); | 425 TransformNode* source_node); |
| 426 void UpdateNodeAndAncestorsAreAnimatedOrInvertible( |
| 427 TransformNode* node, |
| 428 TransformNode* parent_node); |
| 424 | 429 |
| 425 // A TransformNode's source_to_parent value is used to account for the fact | 430 // A TransformNode's source_to_parent value is used to account for the fact |
| 426 // that fixed-position layers are positioned by Blink wrt to their layer tree | 431 // that fixed-position layers are positioned by Blink wrt to their layer tree |
| 427 // parent (their "source"), but are parented in the transform tree by their | 432 // parent (their "source"), but are parented in the transform tree by their |
| 428 // fixed-position container. This value needs to be updated on main-thread | 433 // fixed-position container. This value needs to be updated on main-thread |
| 429 // property trees (for position changes initiated by Blink), but not on the | 434 // property trees (for position changes initiated by Blink), but not on the |
| 430 // compositor thread (since the offset from a node corresponding to a | 435 // compositor thread (since the offset from a node corresponding to a |
| 431 // fixed-position layer to its fixed-position container is unaffected by | 436 // fixed-position layer to its fixed-position container is unaffected by |
| 432 // compositor-driven effects). | 437 // compositor-driven effects). |
| 433 void set_source_to_parent_updates_allowed(bool allowed) { | 438 void set_source_to_parent_updates_allowed(bool allowed) { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 | 683 |
| 679 private: | 684 private: |
| 680 gfx::Vector2dF inner_viewport_container_bounds_delta_; | 685 gfx::Vector2dF inner_viewport_container_bounds_delta_; |
| 681 gfx::Vector2dF outer_viewport_container_bounds_delta_; | 686 gfx::Vector2dF outer_viewport_container_bounds_delta_; |
| 682 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; | 687 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; |
| 683 }; | 688 }; |
| 684 | 689 |
| 685 } // namespace cc | 690 } // namespace cc |
| 686 | 691 |
| 687 #endif // CC_TREES_PROPERTY_TREE_H_ | 692 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |