| 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 // These maps allow mapping directly from a compositor element id to the | 640 // These maps allow mapping directly from a compositor element id to the |
| 641 // respective property node. This will eventually allow simplifying logic in | 641 // respective property node. This will eventually allow simplifying logic in |
| 642 // various places that today has to map from element id to layer id, and then | 642 // various places that today has to map from element id to layer id, and then |
| 643 // from layer id to the respective property node. Completing that work is | 643 // from layer id to the respective property node. Completing that work is |
| 644 // pending the launch of Slimming Paint v2 and reworking UI compositor logic | 644 // pending the launch of Slimming Paint v2 and reworking UI compositor logic |
| 645 // to produce cc property trees and these maps. | 645 // to produce cc property trees and these maps. |
| 646 base::flat_map<ElementId, int> element_id_to_effect_node_index; | 646 base::flat_map<ElementId, int> element_id_to_effect_node_index; |
| 647 base::flat_map<ElementId, int> element_id_to_scroll_node_index; | 647 base::flat_map<ElementId, int> element_id_to_scroll_node_index; |
| 648 base::flat_map<ElementId, int> element_id_to_transform_node_index; | 648 base::flat_map<ElementId, int> element_id_to_transform_node_index; |
| 649 | 649 |
| 650 std::vector<int> always_use_active_tree_opacity_effect_ids; | |
| 651 TransformTree transform_tree; | 650 TransformTree transform_tree; |
| 652 EffectTree effect_tree; | 651 EffectTree effect_tree; |
| 653 ClipTree clip_tree; | 652 ClipTree clip_tree; |
| 654 ScrollTree scroll_tree; | 653 ScrollTree scroll_tree; |
| 655 bool needs_rebuild; | 654 bool needs_rebuild; |
| 656 bool can_adjust_raster_scales; | 655 bool can_adjust_raster_scales; |
| 657 // Change tracking done on property trees needs to be preserved across commits | 656 // Change tracking done on property trees needs to be preserved across commits |
| 658 // (when they are not rebuild). We cache a global bool which stores whether | 657 // (when they are not rebuild). We cache a global bool which stores whether |
| 659 // we did any change tracking so that we can skip copying the change status | 658 // we did any change tracking so that we can skip copying the change status |
| 660 // between property trees when this bool is false. | 659 // between property trees when this bool is false. |
| 661 bool changed; | 660 bool changed; |
| 662 // We cache a global bool for full tree damages to avoid walking the entire | 661 // We cache a global bool for full tree damages to avoid walking the entire |
| 663 // tree. | 662 // tree. |
| 664 // TODO(jaydasika): Changes to transform and effects that damage the entire | 663 // TODO(jaydasika): Changes to transform and effects that damage the entire |
| 665 // tree should be tracked by this bool. Currently, they are tracked by the | 664 // tree should be tracked by this bool. Currently, they are tracked by the |
| 666 // individual nodes. | 665 // individual nodes. |
| 667 bool full_tree_damaged; | 666 bool full_tree_damaged; |
| 668 int sequence_number; | 667 int sequence_number; |
| 669 bool is_main_thread; | 668 bool is_main_thread; |
| 670 bool is_active; | 669 bool is_active; |
| 671 | 670 |
| 672 void clear(); | 671 void clear(); |
| 673 | 672 |
| 674 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); | 673 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); |
| 675 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); | 674 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); |
| 676 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta); | 675 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta); |
| 677 void PushOpacityIfNeeded(PropertyTrees* target_tree); | |
| 678 void RemoveIdFromIdToIndexMaps(int id); | 676 void RemoveIdFromIdToIndexMaps(int id); |
| 679 void UpdateChangeTracking(); | 677 void UpdateChangeTracking(); |
| 680 void PushChangeTrackingTo(PropertyTrees* tree); | 678 void PushChangeTrackingTo(PropertyTrees* tree); |
| 681 void ResetAllChangeTracking(); | 679 void ResetAllChangeTracking(); |
| 682 | 680 |
| 683 gfx::Vector2dF inner_viewport_container_bounds_delta() const { | 681 gfx::Vector2dF inner_viewport_container_bounds_delta() const { |
| 684 return inner_viewport_container_bounds_delta_; | 682 return inner_viewport_container_bounds_delta_; |
| 685 } | 683 } |
| 686 | 684 |
| 687 gfx::Vector2dF outer_viewport_container_bounds_delta() const { | 685 gfx::Vector2dF outer_viewport_container_bounds_delta() const { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; | 722 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; |
| 725 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, | 723 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, |
| 726 int effect_id) const; | 724 int effect_id) const; |
| 727 | 725 |
| 728 PropertyTreesCachedData cached_data_; | 726 PropertyTreesCachedData cached_data_; |
| 729 }; | 727 }; |
| 730 | 728 |
| 731 } // namespace cc | 729 } // namespace cc |
| 732 | 730 |
| 733 #endif // CC_TREES_PROPERTY_TREE_H_ | 731 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |