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

Side by Side Diff: cc/layers/layer_impl.h

Issue 1832663002: cc : Determine if a layer is root by using the value in LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Tree structure. 102 // Tree structure.
103 LayerImpl* parent() { return parent_; } 103 LayerImpl* parent() { return parent_; }
104 const LayerImpl* parent() const { return parent_; } 104 const LayerImpl* parent() const { return parent_; }
105 const LayerImplList& children() const { return children_; } 105 const LayerImplList& children() const { return children_; }
106 LayerImplList& children() { return children_; } 106 LayerImplList& children() { return children_; }
107 LayerImpl* child_at(size_t index) const { return children_[index]; } 107 LayerImpl* child_at(size_t index) const { return children_[index]; }
108 void AddChild(scoped_ptr<LayerImpl> child); 108 void AddChild(scoped_ptr<LayerImpl> child);
109 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); 109 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child);
110 void SetParent(LayerImpl* parent); 110 void SetParent(LayerImpl* parent);
111 111
112 bool HasAncestor(const LayerImpl* ancestor) const;
113
114 void SetScrollParent(LayerImpl* parent); 112 void SetScrollParent(LayerImpl* parent);
115 113
116 LayerImpl* scroll_parent() { return scroll_parent_; } 114 LayerImpl* scroll_parent() { return scroll_parent_; }
117 const LayerImpl* scroll_parent() const { return scroll_parent_; } 115 const LayerImpl* scroll_parent() const { return scroll_parent_; }
118 116
119 void SetScrollChildren(std::set<LayerImpl*>* children); 117 void SetScrollChildren(std::set<LayerImpl*>* children);
120 118
121 std::set<LayerImpl*>* scroll_children() { return scroll_children_.get(); } 119 std::set<LayerImpl*>* scroll_children() { return scroll_children_.get(); }
122 const std::set<LayerImpl*>* scroll_children() const { 120 const std::set<LayerImpl*>* scroll_children() const {
123 return scroll_children_.get(); 121 return scroll_children_.get();
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 // If true, the layer or one of its descendants has a touch handler. 775 // If true, the layer or one of its descendants has a touch handler.
778 bool layer_or_descendant_has_touch_handler_; 776 bool layer_or_descendant_has_touch_handler_;
779 bool sorted_for_recursion_; 777 bool sorted_for_recursion_;
780 778
781 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 779 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
782 }; 780 };
783 781
784 } // namespace cc 782 } // namespace cc
785 783
786 #endif // CC_LAYERS_LAYER_IMPL_H_ 784 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698