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

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

Issue 1825273002: Add more out of line copy ctors for complex classes. (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 | « blimp/client/session/assignment_source.cc ('k') | cc/layers/layer_list_iterator.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_LIST_ITERATOR_H_ 5 #ifndef CC_LAYERS_LAYER_LIST_ITERATOR_H_
6 #define CC_LAYERS_LAYER_LIST_ITERATOR_H_ 6 #define CC_LAYERS_LAYER_LIST_ITERATOR_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class LayerImpl; 15 class LayerImpl;
16 16
17 // Unlike LayerIterator and friends, these iterators are not intended to permit 17 // Unlike LayerIterator and friends, these iterators are not intended to permit
18 // traversing the RSLL. Rather, they visit a collection of LayerImpls in 18 // traversing the RSLL. Rather, they visit a collection of LayerImpls in
19 // stacking order. All recursive walks over the LayerImpl tree should be 19 // stacking order. All recursive walks over the LayerImpl tree should be
20 // switched to use these classes instead as the concept of a LayerImpl tree is 20 // switched to use these classes instead as the concept of a LayerImpl tree is
21 // deprecated. 21 // deprecated.
22 class CC_EXPORT LayerListIterator { 22 class CC_EXPORT LayerListIterator {
23 public: 23 public:
24 explicit LayerListIterator(LayerImpl* root_layer); 24 explicit LayerListIterator(LayerImpl* root_layer);
25 LayerListIterator(const LayerListIterator& other);
25 virtual ~LayerListIterator(); 26 virtual ~LayerListIterator();
26 27
27 bool operator==(const LayerListIterator& other) const { 28 bool operator==(const LayerListIterator& other) const {
28 return current_layer_ == other.current_layer_; 29 return current_layer_ == other.current_layer_;
29 } 30 }
30 31
31 bool operator!=(const LayerListIterator& other) const { 32 bool operator!=(const LayerListIterator& other) const {
32 return !(*this == other); 33 return !(*this == other);
33 } 34 }
34 35
(...skipping 18 matching lines...) Expand all
53 // We will only support prefix increment. 54 // We will only support prefix increment.
54 LayerListIterator& operator++() override; 55 LayerListIterator& operator++() override;
55 56
56 private: 57 private:
57 void DescendToRightmostInSubtree(); 58 void DescendToRightmostInSubtree();
58 }; 59 };
59 60
60 } // namespace cc 61 } // namespace cc
61 62
62 #endif // CC_LAYERS_LAYER_LIST_ITERATOR_H_ 63 #endif // CC_LAYERS_LAYER_LIST_ITERATOR_H_
OLDNEW
« no previous file with comments | « blimp/client/session/assignment_source.cc ('k') | cc/layers/layer_list_iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698