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

Unified Diff: cc/trees/tree_synchronizer.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/trees/tree_synchronizer.h ('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 c7e42ea066120c66b472dad9c0438547eee4e17e..1bd19bf5fb5d63795fd2b26de8041302f8611926 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -23,7 +23,7 @@ void SynchronizeTreesInternal(LayerType* layer_root, LayerTreeImpl* tree_impl) {
DCHECK(tree_impl);
TRACE_EVENT0("cc", "TreeSynchronizer::SynchronizeTrees");
- scoped_ptr<OwnedLayerImplList> old_layers(tree_impl->DetachLayers());
+ std::unique_ptr<OwnedLayerImplList> old_layers(tree_impl->DetachLayers());
OwnedLayerImplMap old_layer_map;
for (auto& it : *old_layers)
@@ -57,26 +57,26 @@ void TreeSynchronizer::SynchronizeTrees(LayerImpl* layer_root,
}
template <typename LayerType>
-scoped_ptr<LayerImpl> ReuseOrCreateLayerImpl(OwnedLayerImplMap* old_layers,
- LayerType* layer,
- LayerTreeImpl* tree_impl) {
+std::unique_ptr<LayerImpl> ReuseOrCreateLayerImpl(OwnedLayerImplMap* old_layers,
+ LayerType* layer,
+ LayerTreeImpl* tree_impl) {
if (!layer)
return nullptr;
- scoped_ptr<LayerImpl> layer_impl = std::move((*old_layers)[layer->id()]);
+ std::unique_ptr<LayerImpl> layer_impl = std::move((*old_layers)[layer->id()]);
if (!layer_impl)
layer_impl = layer->CreateLayerImpl(tree_impl);
return layer_impl;
}
template <typename LayerType>
-scoped_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
+std::unique_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
OwnedLayerImplMap* old_layers,
LayerType* layer,
LayerTreeImpl* tree_impl) {
if (!layer)
return nullptr;
- scoped_ptr<LayerImpl> layer_impl(
+ std::unique_ptr<LayerImpl> layer_impl(
ReuseOrCreateLayerImpl(old_layers, layer, tree_impl));
layer_impl->children().clear();
@@ -85,7 +85,7 @@ scoped_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
old_layers, layer->child_at(i), tree_impl));
}
- scoped_ptr<LayerImpl> mask_layer = SynchronizeTreesRecursiveInternal(
+ std::unique_ptr<LayerImpl> mask_layer = SynchronizeTreesRecursiveInternal(
old_layers, layer->mask_layer(), tree_impl);
if (layer_impl->mask_layer() && mask_layer &&
layer_impl->mask_layer() == mask_layer.get()) {
@@ -96,7 +96,7 @@ scoped_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
layer_impl->SetMaskLayer(std::move(mask_layer));
}
- scoped_ptr<LayerImpl> replica_layer = SynchronizeTreesRecursiveInternal(
+ std::unique_ptr<LayerImpl> replica_layer = SynchronizeTreesRecursiveInternal(
old_layers, layer->replica_layer(), tree_impl);
if (layer_impl->replica_layer() && replica_layer &&
layer_impl->replica_layer() == replica_layer.get()) {
« no previous file with comments | « cc/trees/tree_synchronizer.h ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698