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

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

Issue 2832743002: Add ScrollTree::FindNodeFromElementId (Closed)
Patch Set: Created 3 years, 8 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/trees/layer_tree_impl.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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 LayerTreeImpl* layer_tree_impl); 497 LayerTreeImpl* layer_tree_impl);
498 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset, 498 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset,
499 ScrollNode* scroll_node) const; 499 ScrollNode* scroll_node) const;
500 500
501 const SyncedScrollOffset* GetSyncedScrollOffset(int layer_id) const; 501 const SyncedScrollOffset* GetSyncedScrollOffset(int layer_id) const;
502 502
503 #if DCHECK_IS_ON() 503 #if DCHECK_IS_ON()
504 void CopyCompleteTreeState(const ScrollTree& other); 504 void CopyCompleteTreeState(const ScrollTree& other);
505 #endif 505 #endif
506 506
507 ScrollNode* FindNodeFromElementId(ElementId id);
508
507 private: 509 private:
508 using ScrollOffsetMap = std::unordered_map<int, gfx::ScrollOffset>; 510 using ScrollOffsetMap = std::unordered_map<int, gfx::ScrollOffset>;
509 using SyncedScrollOffsetMap = 511 using SyncedScrollOffsetMap =
510 std::unordered_map<int, scoped_refptr<SyncedScrollOffset>>; 512 std::unordered_map<int, scoped_refptr<SyncedScrollOffset>>;
511 513
512 int currently_scrolling_node_id_; 514 int currently_scrolling_node_id_;
513 515
514 // On the main thread we store the scroll offsets directly since the main 516 // On the main thread we store the scroll offsets directly since the main
515 // thread only needs to keep track of the current main thread state. The impl 517 // thread only needs to keep track of the current main thread state. The impl
516 // thread stores a map of SyncedProperty instances in order to track 518 // thread stores a map of SyncedProperty instances in order to track
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; 731 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const;
730 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, 732 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id,
731 int effect_id) const; 733 int effect_id) const;
732 734
733 PropertyTreesCachedData cached_data_; 735 PropertyTreesCachedData cached_data_;
734 }; 736 };
735 737
736 } // namespace cc 738 } // namespace cc
737 739
738 #endif // CC_TREES_PROPERTY_TREE_H_ 740 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698