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

Side by Side Diff: cc/trees/tree_synchronizer.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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/trees/thread_proxy.cc ('k') | cc/trees/tree_synchronizer_unittest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/tree_synchronizer.h" 5 #include "cc/trees/tree_synchronizer.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return layer_impl.Pass(); 98 return layer_impl.Pass();
99 } 99 }
100 100
101 template <typename LayerType> 101 template <typename LayerType>
102 scoped_ptr<LayerImpl> SynchronizeTreesRecursiveInternal( 102 scoped_ptr<LayerImpl> SynchronizeTreesRecursiveInternal(
103 RawPtrLayerImplMap* new_layers, 103 RawPtrLayerImplMap* new_layers,
104 ScopedPtrLayerImplMap* old_layers, 104 ScopedPtrLayerImplMap* old_layers,
105 LayerType* layer, 105 LayerType* layer,
106 LayerTreeImpl* tree_impl) { 106 LayerTreeImpl* tree_impl) {
107 if (!layer) 107 if (!layer)
108 return scoped_ptr<LayerImpl>(); 108 return nullptr;
109 109
110 scoped_ptr<LayerImpl> layer_impl = 110 scoped_ptr<LayerImpl> layer_impl =
111 ReuseOrCreateLayerImpl(new_layers, old_layers, layer, tree_impl); 111 ReuseOrCreateLayerImpl(new_layers, old_layers, layer, tree_impl);
112 112
113 layer_impl->ClearChildList(); 113 layer_impl->ClearChildList();
114 for (size_t i = 0; i < layer->children().size(); ++i) { 114 for (size_t i = 0; i < layer->children().size(); ++i) {
115 layer_impl->AddChild(SynchronizeTreesRecursiveInternal( 115 layer_impl->AddChild(SynchronizeTreesRecursiveInternal(
116 new_layers, old_layers, layer->child_at(i), tree_impl)); 116 new_layers, old_layers, layer->child_at(i), tree_impl));
117 } 117 }
118 118
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 #endif 302 #endif
303 } 303 }
304 304
305 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { 305 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) {
306 size_t num_dependents_need_push_properties = 0; 306 size_t num_dependents_need_push_properties = 0;
307 PushPropertiesInternal( 307 PushPropertiesInternal(
308 layer, layer_impl, &num_dependents_need_push_properties); 308 layer, layer_impl, &num_dependents_need_push_properties);
309 } 309 }
310 310
311 } // namespace cc 311 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698