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

Side by Side Diff: cc/layers/io_surface_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
« no previous file with comments | « cc/layers/io_surface_layer.cc ('k') | cc/layers/layer.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/io_surface_layer_impl.h" 5 #include "cc/layers/io_surface_layer_impl.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "cc/output/gl_renderer.h" // For the GLC() macro. 8 #include "cc/output/gl_renderer.h" // For the GLC() macro.
9 #include "cc/output/output_surface.h" 9 #include "cc/output/output_surface.h"
10 #include "cc/quads/io_surface_draw_quad.h" 10 #include "cc/quads/io_surface_draw_quad.h"
(...skipping 20 matching lines...) Expand all
31 if (io_surface_resource_id_) { 31 if (io_surface_resource_id_) {
32 ResourceProvider* resource_provider = 32 ResourceProvider* resource_provider =
33 layer_tree_impl()->resource_provider(); 33 layer_tree_impl()->resource_provider();
34 resource_provider->DeleteResource(io_surface_resource_id_); 34 resource_provider->DeleteResource(io_surface_resource_id_);
35 io_surface_resource_id_ = 0; 35 io_surface_resource_id_ = 0;
36 } 36 }
37 } 37 }
38 38
39 scoped_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl( 39 scoped_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl(
40 LayerTreeImpl* tree_impl) { 40 LayerTreeImpl* tree_impl) {
41 return IOSurfaceLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); 41 return IOSurfaceLayerImpl::Create(tree_impl, id());
42 } 42 }
43 43
44 void IOSurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) { 44 void IOSurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) {
45 LayerImpl::PushPropertiesTo(layer); 45 LayerImpl::PushPropertiesTo(layer);
46 46
47 IOSurfaceLayerImpl* io_surface_layer = 47 IOSurfaceLayerImpl* io_surface_layer =
48 static_cast<IOSurfaceLayerImpl*>(layer); 48 static_cast<IOSurfaceLayerImpl*>(layer);
49 io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_); 49 io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_);
50 } 50 }
51 51
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 io_surface_id_ = io_surface_id; 110 io_surface_id_ = io_surface_id;
111 io_surface_size_ = size; 111 io_surface_size_ = size;
112 } 112 }
113 113
114 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { 114 const char* IOSurfaceLayerImpl::LayerTypeAsString() const {
115 return "cc::IOSurfaceLayerImpl"; 115 return "cc::IOSurfaceLayerImpl";
116 } 116 }
117 117
118 } // namespace cc 118 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/io_surface_layer.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698