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

Side by Side Diff: cc/layers/delegated_renderer_layer_impl.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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/delegated_renderer_layer_impl.h" 5 #include "cc/layers/delegated_renderer_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 render_passes_in_draw_order->clear(); 176 render_passes_in_draw_order->clear();
177 } 177 }
178 178
179 void DelegatedRendererLayerImpl::ClearRenderPasses() { 179 void DelegatedRendererLayerImpl::ClearRenderPasses() {
180 render_passes_index_by_id_.clear(); 180 render_passes_index_by_id_.clear();
181 render_passes_in_draw_order_.clear(); 181 render_passes_in_draw_order_.clear();
182 } 182 }
183 183
184 scoped_ptr<LayerImpl> DelegatedRendererLayerImpl::CreateLayerImpl( 184 scoped_ptr<LayerImpl> DelegatedRendererLayerImpl::CreateLayerImpl(
185 LayerTreeImpl* tree_impl) { 185 LayerTreeImpl* tree_impl) {
186 return DelegatedRendererLayerImpl::Create( 186 return DelegatedRendererLayerImpl::Create(tree_impl, id());
187 tree_impl, id()).PassAs<LayerImpl>();
188 } 187 }
189 188
190 void DelegatedRendererLayerImpl::ReleaseResources() { 189 void DelegatedRendererLayerImpl::ReleaseResources() {
191 ClearRenderPasses(); 190 ClearRenderPasses();
192 ClearChildId(); 191 ClearChildId();
193 } 192 }
194 193
195 static inline int IndexToId(int index) { return index + 1; } 194 static inline int IndexToId(int index) { return index + 1; }
196 static inline int IdToIndex(int id) { return id - 1; } 195 static inline int IdToIndex(int id) { return id - 1; }
197 196
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 if (own_child_id_) { 495 if (own_child_id_) {
497 ResourceProvider* provider = layer_tree_impl()->resource_provider(); 496 ResourceProvider* provider = layer_tree_impl()->resource_provider();
498 provider->DestroyChild(child_id_); 497 provider->DestroyChild(child_id_);
499 } 498 }
500 499
501 resources_.clear(); 500 resources_.clear();
502 child_id_ = 0; 501 child_id_ = 0;
503 } 502 }
504 503
505 } // namespace cc 504 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer.cc ('k') | cc/layers/delegated_renderer_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698