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

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

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 | « cc/layers/layer_list_iterator.h ('k') | cc/scheduler/scheduler_settings.h » ('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 #include "cc/layers/layer_list_iterator.h" 5 #include "cc/layers/layer_list_iterator.h"
6 6
7 #include "cc/layers/layer_impl.h" 7 #include "cc/layers/layer_impl.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 LayerListIterator::LayerListIterator(LayerImpl* root_layer) 11 LayerListIterator::LayerListIterator(LayerImpl* root_layer)
12 : current_layer_(root_layer) { 12 : current_layer_(root_layer) {
13 DCHECK(!root_layer || !root_layer->parent()); 13 DCHECK(!root_layer || !root_layer->parent());
14 list_indices_.push_back(0); 14 list_indices_.push_back(0);
15 } 15 }
16 16
17 LayerListIterator::LayerListIterator(const LayerListIterator& other) = default;
18
17 LayerListIterator::~LayerListIterator() {} 19 LayerListIterator::~LayerListIterator() {}
18 20
19 LayerListIterator& LayerListIterator::operator++() { 21 LayerListIterator& LayerListIterator::operator++() {
20 // case 0: done 22 // case 0: done
21 if (!current_layer_) 23 if (!current_layer_)
22 return *this; 24 return *this;
23 25
24 // case 1: descend. 26 // case 1: descend.
25 const LayerImplList& current_list = current_layer_->children(); 27 const LayerImplList& current_list = current_layer_->children();
26 if (!current_list.empty()) { 28 if (!current_list.empty()) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (current_list.empty()) 89 if (current_list.empty())
88 return; 90 return;
89 91
90 size_t last_index = current_list.size() - 1; 92 size_t last_index = current_list.size() - 1;
91 current_layer_ = current_list[last_index]; 93 current_layer_ = current_list[last_index];
92 list_indices_.push_back(last_index); 94 list_indices_.push_back(last_index);
93 DescendToRightmostInSubtree(); 95 DescendToRightmostInSubtree();
94 } 96 }
95 97
96 } // namespace cc 98 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_list_iterator.h ('k') | cc/scheduler/scheduler_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698