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

Side by Side Diff: cc/layers/delegated_renderer_layer.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/layers/content_layer.cc ('k') | cc/layers/delegated_renderer_layer_impl.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 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.h" 5 #include "cc/layers/delegated_renderer_layer.h"
6 6
7 #include "cc/layers/delegated_renderer_layer_impl.h" 7 #include "cc/layers/delegated_renderer_layer_impl.h"
8 #include "cc/output/delegated_frame_data.h" 8 #include "cc/output/delegated_frame_data.h"
9 #include "cc/quads/render_pass_draw_quad.h" 9 #include "cc/quads/render_pass_draw_quad.h"
10 #include "cc/trees/layer_tree_host.h" 10 #include "cc/trees/layer_tree_host.h"
(...skipping 15 matching lines...) Expand all
26 weak_ptrs_(this) { 26 weak_ptrs_(this) {
27 frame_provider_->AddObserver(this); 27 frame_provider_->AddObserver(this);
28 } 28 }
29 29
30 DelegatedRendererLayer::~DelegatedRendererLayer() { 30 DelegatedRendererLayer::~DelegatedRendererLayer() {
31 frame_provider_->RemoveObserver(this); 31 frame_provider_->RemoveObserver(this);
32 } 32 }
33 33
34 scoped_ptr<LayerImpl> DelegatedRendererLayer::CreateLayerImpl( 34 scoped_ptr<LayerImpl> DelegatedRendererLayer::CreateLayerImpl(
35 LayerTreeImpl* tree_impl) { 35 LayerTreeImpl* tree_impl) {
36 return DelegatedRendererLayerImpl::Create( 36 return DelegatedRendererLayerImpl::Create(tree_impl, layer_id_);
37 tree_impl, layer_id_).PassAs<LayerImpl>();
38 } 37 }
39 38
40 void DelegatedRendererLayer::SetLayerTreeHost(LayerTreeHost* host) { 39 void DelegatedRendererLayer::SetLayerTreeHost(LayerTreeHost* host) {
41 if (layer_tree_host() == host) { 40 if (layer_tree_host() == host) {
42 Layer::SetLayerTreeHost(host); 41 Layer::SetLayerTreeHost(host);
43 return; 42 return;
44 } 43 }
45 44
46 if (!host) { 45 if (!host) {
47 // The active frame needs to be removed from the active tree and resources 46 // The active frame needs to be removed from the active tree and resources
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 93
95 SetNeedsPushProperties(); 94 SetNeedsPushProperties();
96 return true; 95 return true;
97 } 96 }
98 97
99 bool DelegatedRendererLayer::HasDelegatedContent() const { 98 bool DelegatedRendererLayer::HasDelegatedContent() const {
100 return true; 99 return true;
101 } 100 }
102 101
103 } // namespace cc 102 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/content_layer.cc ('k') | cc/layers/delegated_renderer_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698