Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: cc/trees/property_tree.h

Issue 2014533005: cc : Reland Add IsInIdtoIndexMap to property tres (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/scrollbar_layer_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 bool operator==(const PropertyTrees& other) const; 669 bool operator==(const PropertyTrees& other) const;
670 PropertyTrees& operator=(const PropertyTrees& from); 670 PropertyTrees& operator=(const PropertyTrees& from);
671 671
672 void ToProtobuf(proto::PropertyTrees* proto) const; 672 void ToProtobuf(proto::PropertyTrees* proto) const;
673 void FromProtobuf(const proto::PropertyTrees& proto); 673 void FromProtobuf(const proto::PropertyTrees& proto);
674 674
675 std::unordered_map<int, int> transform_id_to_index_map; 675 std::unordered_map<int, int> transform_id_to_index_map;
676 std::unordered_map<int, int> effect_id_to_index_map; 676 std::unordered_map<int, int> effect_id_to_index_map;
677 std::unordered_map<int, int> clip_id_to_index_map; 677 std::unordered_map<int, int> clip_id_to_index_map;
678 std::unordered_map<int, int> scroll_id_to_index_map; 678 std::unordered_map<int, int> scroll_id_to_index_map;
679 enum TreeType { TRANSFORM, EFFECT, CLIP, SCROLL };
679 680
680 std::vector<int> always_use_active_tree_opacity_effect_ids; 681 std::vector<int> always_use_active_tree_opacity_effect_ids;
681 TransformTree transform_tree; 682 TransformTree transform_tree;
682 EffectTree effect_tree; 683 EffectTree effect_tree;
683 ClipTree clip_tree; 684 ClipTree clip_tree;
684 ScrollTree scroll_tree; 685 ScrollTree scroll_tree;
685 bool needs_rebuild; 686 bool needs_rebuild;
686 bool non_root_surfaces_enabled; 687 bool non_root_surfaces_enabled;
687 // Change tracking done on property trees needs to be preserved across commits 688 // Change tracking done on property trees needs to be preserved across commits
688 // (when they are not rebuild). We cache a global bool which stores whether 689 // (when they are not rebuild). We cache a global bool which stores whether
689 // we did any change tracking so that we can skip copying the change status 690 // we did any change tracking so that we can skip copying the change status
690 // between property trees when this bool is false. 691 // between property trees when this bool is false.
691 bool changed; 692 bool changed;
692 // We cache a global bool for full tree damages to avoid walking the entire 693 // We cache a global bool for full tree damages to avoid walking the entire
693 // tree. 694 // tree.
694 // TODO(jaydasika): Changes to transform and effects that damage the entire 695 // TODO(jaydasika): Changes to transform and effects that damage the entire
695 // tree should be tracked by this bool. Currently, they are tracked by the 696 // tree should be tracked by this bool. Currently, they are tracked by the
696 // individual nodes. 697 // individual nodes.
697 bool full_tree_damaged; 698 bool full_tree_damaged;
698 int sequence_number; 699 int sequence_number;
699 bool is_main_thread; 700 bool is_main_thread;
700 bool is_active; 701 bool is_active;
701 702
702 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); 703 void SetInnerViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta);
703 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta); 704 void SetOuterViewportContainerBoundsDelta(gfx::Vector2dF bounds_delta);
704 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta); 705 void SetInnerViewportScrollBoundsDelta(gfx::Vector2dF bounds_delta);
705 void PushOpacityIfNeeded(PropertyTrees* target_tree); 706 void PushOpacityIfNeeded(PropertyTrees* target_tree);
707 void RemoveIdFromIdToIndexMaps(int id);
708 bool IsInIdToIndexMap(TreeType tree_type, int id);
706 void UpdateChangeTracking(); 709 void UpdateChangeTracking();
707 void PushChangeTrackingTo(PropertyTrees* tree); 710 void PushChangeTrackingTo(PropertyTrees* tree);
708 void ResetAllChangeTracking(); 711 void ResetAllChangeTracking();
709 712
710 gfx::Vector2dF inner_viewport_container_bounds_delta() const { 713 gfx::Vector2dF inner_viewport_container_bounds_delta() const {
711 return inner_viewport_container_bounds_delta_; 714 return inner_viewport_container_bounds_delta_;
712 } 715 }
713 716
714 gfx::Vector2dF outer_viewport_container_bounds_delta() const { 717 gfx::Vector2dF outer_viewport_container_bounds_delta() const {
715 return outer_viewport_container_bounds_delta_; 718 return outer_viewport_container_bounds_delta_;
716 } 719 }
717 720
718 gfx::Vector2dF inner_viewport_scroll_bounds_delta() const { 721 gfx::Vector2dF inner_viewport_scroll_bounds_delta() const {
719 return inner_viewport_scroll_bounds_delta_; 722 return inner_viewport_scroll_bounds_delta_;
720 } 723 }
721 724
722 std::unique_ptr<base::trace_event::TracedValue> AsTracedValue() const; 725 std::unique_ptr<base::trace_event::TracedValue> AsTracedValue() const;
723 726
724 private: 727 private:
725 gfx::Vector2dF inner_viewport_container_bounds_delta_; 728 gfx::Vector2dF inner_viewport_container_bounds_delta_;
726 gfx::Vector2dF outer_viewport_container_bounds_delta_; 729 gfx::Vector2dF outer_viewport_container_bounds_delta_;
727 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; 730 gfx::Vector2dF inner_viewport_scroll_bounds_delta_;
728 }; 731 };
729 732
730 } // namespace cc 733 } // namespace cc
731 734
732 #endif // CC_TREES_PROPERTY_TREE_H_ 735 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_layer_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698