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

Unified Diff: cc/layers/layer_list_iterator.cc

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/layer_lists.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_list_iterator.cc
diff --git a/cc/layers/layer_list_iterator.cc b/cc/layers/layer_list_iterator.cc
index 858440b4964c55f00a22da0cfb131c14b145810b..d64a946fac261520b40adfb57a4376c1046cd60c 100644
--- a/cc/layers/layer_list_iterator.cc
+++ b/cc/layers/layer_list_iterator.cc
@@ -22,9 +22,9 @@ LayerListIterator& LayerListIterator::operator++() {
return *this;
// case 1: descend.
- const OwnedLayerImplList& current_list = current_layer_->children();
+ const LayerImplList& current_list = current_layer_->children();
if (!current_list.empty()) {
- current_layer_ = current_list[0].get();
+ current_layer_ = current_list[0];
list_indices_.push_back(0);
return *this;
}
@@ -32,12 +32,12 @@ LayerListIterator& LayerListIterator::operator++() {
for (LayerImpl* parent = current_layer_->parent(); parent;
parent = parent->parent()) {
// We now try and advance in some list of siblings.
- const OwnedLayerImplList& sibling_list = parent->children();
+ const LayerImplList& sibling_list = parent->children();
// case 2: Advance to a sibling.
if (list_indices_.back() + 1 < sibling_list.size()) {
++list_indices_.back();
- current_layer_ = sibling_list[list_indices_.back()].get();
+ current_layer_ = sibling_list[list_indices_.back()];
return *this;
}
@@ -73,8 +73,8 @@ LayerListIterator& LayerListReverseIterator::operator++() {
// sibling over, and then descend to the rightmost descendant in that subtree.
CHECK(current_layer_->parent());
--list_indices_.back();
- const OwnedLayerImplList& parent_list = current_layer_->parent()->children();
- current_layer_ = parent_list[list_indices_.back()].get();
+ const LayerImplList& parent_list = current_layer_->parent()->children();
+ current_layer_ = parent_list[list_indices_.back()];
DescendToRightmostInSubtree();
return *this;
}
@@ -83,12 +83,12 @@ void LayerListReverseIterator::DescendToRightmostInSubtree() {
if (!current_layer_)
return;
- const OwnedLayerImplList& current_list = current_layer_->children();
+ const LayerImplList& current_list = current_layer_->children();
if (current_list.empty())
return;
size_t last_index = current_list.size() - 1;
- current_layer_ = current_list[last_index].get();
+ current_layer_ = current_list[last_index];
list_indices_.push_back(last_index);
DescendToRightmostInSubtree();
}
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/layer_lists.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698