| 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 bool operator==(const PropertyTrees& other) const; | 668 bool operator==(const PropertyTrees& other) const; |
| 669 PropertyTrees& operator=(const PropertyTrees& from); | 669 PropertyTrees& operator=(const PropertyTrees& from); |
| 670 | 670 |
| 671 void ToProtobuf(proto::PropertyTrees* proto) const; | 671 void ToProtobuf(proto::PropertyTrees* proto) const; |
| 672 void FromProtobuf(const proto::PropertyTrees& proto); | 672 void FromProtobuf(const proto::PropertyTrees& proto); |
| 673 | 673 |
| 674 std::unordered_map<int, int> transform_id_to_index_map; | 674 std::unordered_map<int, int> transform_id_to_index_map; |
| 675 std::unordered_map<int, int> effect_id_to_index_map; | 675 std::unordered_map<int, int> effect_id_to_index_map; |
| 676 std::unordered_map<int, int> clip_id_to_index_map; | 676 std::unordered_map<int, int> clip_id_to_index_map; |
| 677 std::unordered_map<int, int> scroll_id_to_index_map; | 677 std::unordered_map<int, int> scroll_id_to_index_map; |
| 678 |
| 679 std::vector<int> always_use_active_tree_opacity_effect_ids; |
| 678 TransformTree transform_tree; | 680 TransformTree transform_tree; |
| 679 EffectTree effect_tree; | 681 EffectTree effect_tree; |
| 680 ClipTree clip_tree; | 682 ClipTree clip_tree; |
| 681 ScrollTree scroll_tree; | 683 ScrollTree scroll_tree; |
| 682 bool needs_rebuild; | 684 bool needs_rebuild; |
| 683 bool non_root_surfaces_enabled; | 685 bool non_root_surfaces_enabled; |
| 684 // Change tracking done on property trees needs to be preserved across commits | 686 // Change tracking done on property trees needs to be preserved across commits |
| 685 // (when they are not rebuild). We cache a global bool which stores whether | 687 // (when they are not rebuild). We cache a global bool which stores whether |
| 686 // we did any change tracking so that we can skip copying the change status | 688 // we did any change tracking so that we can skip copying the change status |
| 687 // between property trees when this bool is false. | 689 // between property trees when this bool is false. |
| 688 bool changed; | 690 bool changed; |
| 689 // We cache a global bool for full tree damages to avoid walking the entire | 691 // We cache a global bool for full tree damages to avoid walking the entire |
| 690 // tree. | 692 // tree. |
| 691 // TODO(jaydasika): Changes to transform and effects that damage the entire | 693 // TODO(jaydasika): Changes to transform and effects that damage the entire |
| 692 // tree should be tracked by this bool. Currently, they are tracked by the | 694 // tree should be tracked by this bool. Currently, they are tracked by the |
| 693 // individual nodes. | 695 // individual nodes. |
| 694 bool full_tree_damaged; | 696 bool full_tree_damaged; |
| 695 int sequence_number; | 697 int sequence_number; |
| 696 bool is_main_thread; | 698 bool is_main_thread; |
| 697 bool is_active; | 699 bool is_active; |
| 698 enum ResetFlags { EFFECT_TREE, TRANSFORM_TREE, ALL_TREES }; | 700 enum ResetFlags { EFFECT_TREE, TRANSFORM_TREE, ALL_TREES }; |
| 699 | 701 |
| 700 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); | 702 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); |
| 701 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); | 703 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); |
| 702 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta); | 704 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta); |
| 705 void PushOpacityIfNeeded(PropertyTrees* target_tree); |
| 703 void UpdateChangeTracking(); | 706 void UpdateChangeTracking(); |
| 704 void PushChangeTrackingTo(PropertyTrees* tree); | 707 void PushChangeTrackingTo(PropertyTrees* tree); |
| 705 void ResetAllChangeTracking(ResetFlags flag); | 708 void ResetAllChangeTracking(ResetFlags flag); |
| 706 | 709 |
| 707 gfx::Vector2dF inner_viewport_container_bounds_delta() const { | 710 gfx::Vector2dF inner_viewport_container_bounds_delta() const { |
| 708 return inner_viewport_container_bounds_delta_; | 711 return inner_viewport_container_bounds_delta_; |
| 709 } | 712 } |
| 710 | 713 |
| 711 gfx::Vector2dF outer_viewport_container_bounds_delta() const { | 714 gfx::Vector2dF outer_viewport_container_bounds_delta() const { |
| 712 return outer_viewport_container_bounds_delta_; | 715 return outer_viewport_container_bounds_delta_; |
| 713 } | 716 } |
| 714 | 717 |
| 715 gfx::Vector2dF inner_viewport_scroll_bounds_delta() const { | 718 gfx::Vector2dF inner_viewport_scroll_bounds_delta() const { |
| 716 return inner_viewport_scroll_bounds_delta_; | 719 return inner_viewport_scroll_bounds_delta_; |
| 717 } | 720 } |
| 718 | 721 |
| 719 std::unique_ptr<base::trace_event::TracedValue> AsTracedValue() const; | 722 std::unique_ptr<base::trace_event::TracedValue> AsTracedValue() const; |
| 720 | 723 |
| 721 private: | 724 private: |
| 722 gfx::Vector2dF inner_viewport_container_bounds_delta_; | 725 gfx::Vector2dF inner_viewport_container_bounds_delta_; |
| 723 gfx::Vector2dF outer_viewport_container_bounds_delta_; | 726 gfx::Vector2dF outer_viewport_container_bounds_delta_; |
| 724 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; | 727 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; |
| 725 }; | 728 }; |
| 726 | 729 |
| 727 } // namespace cc | 730 } // namespace cc |
| 728 | 731 |
| 729 #endif // CC_TREES_PROPERTY_TREE_H_ | 732 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |