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

Unified Diff: cc/trees/tree_synchronizer.cc

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . Created 5 years, 1 month 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/trees/threaded_channel_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/tree_synchronizer.cc
diff --git a/cc/trees/tree_synchronizer.cc b/cc/trees/tree_synchronizer.cc
index 4ecf5d3c95763604f6203427a4f3eb70bcd61fed..993514716e115556d71103fa48bffe2ac12ddcbc 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -32,7 +32,7 @@ void CollectExistingLayerImplRecursive(ScopedPtrLayerImplMap* old_layers,
CollectExistingLayerImplRecursive(old_layers, layer_impl->TakeReplicaLayer());
int id = layer_impl->id();
- old_layers->set(id, layer_impl.Pass());
+ old_layers->set(id, std::move(layer_impl));
}
template <typename LayerType>
@@ -46,28 +46,29 @@ scoped_ptr<LayerImpl> SynchronizeTreesInternal(
ScopedPtrLayerImplMap old_layers;
RawPtrLayerImplMap new_layers;
- CollectExistingLayerImplRecursive(&old_layers, old_layer_impl_root.Pass());
+ CollectExistingLayerImplRecursive(&old_layers,
+ std::move(old_layer_impl_root));
scoped_ptr<LayerImpl> new_tree = SynchronizeTreesRecursive(
&new_layers, &old_layers, layer_root, tree_impl);
- return new_tree.Pass();
+ return new_tree;
}
scoped_ptr<LayerImpl> TreeSynchronizer::SynchronizeTrees(
Layer* layer_root,
scoped_ptr<LayerImpl> old_layer_impl_root,
LayerTreeImpl* tree_impl) {
- return SynchronizeTreesInternal(
- layer_root, old_layer_impl_root.Pass(), tree_impl);
+ return SynchronizeTreesInternal(layer_root, std::move(old_layer_impl_root),
+ tree_impl);
}
scoped_ptr<LayerImpl> TreeSynchronizer::SynchronizeTrees(
LayerImpl* layer_root,
scoped_ptr<LayerImpl> old_layer_impl_root,
LayerTreeImpl* tree_impl) {
- return SynchronizeTreesInternal(
- layer_root, old_layer_impl_root.Pass(), tree_impl);
+ return SynchronizeTreesInternal(layer_root, std::move(old_layer_impl_root),
+ tree_impl);
}
template <typename LayerType>
@@ -81,7 +82,7 @@ scoped_ptr<LayerImpl> ReuseOrCreateLayerImpl(RawPtrLayerImplMap* new_layers,
layer_impl = layer->CreateLayerImpl(tree_impl);
(*new_layers)[layer->id()] = layer_impl.get();
- return layer_impl.Pass();
+ return layer_impl;
}
template <typename LayerType>
@@ -107,7 +108,7 @@ scoped_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
layer_impl->SetReplicaLayer(SynchronizeTreesRecursiveInternal(
new_layers, old_layers, layer->replica_layer(), tree_impl));
- return layer_impl.Pass();
+ return layer_impl;
}
scoped_ptr<LayerImpl> SynchronizeTreesRecursive(
« no previous file with comments | « cc/trees/threaded_channel_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698