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

Side by Side Diff: cc/layers/io_surface_layer_impl.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 unified diff | Download patch
« no previous file with comments | « cc/layers/io_surface_layer_impl.h ('k') | cc/layers/layer.h » ('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/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/quads/io_surface_draw_quad.h" 9 #include "cc/quads/io_surface_draw_quad.h"
10 #include "cc/trees/layer_tree_impl.h" 10 #include "cc/trees/layer_tree_impl.h"
(...skipping 13 matching lines...) Expand all
24 24
25 void IOSurfaceLayerImpl::DestroyResource() { 25 void IOSurfaceLayerImpl::DestroyResource() {
26 if (io_surface_resource_id_) { 26 if (io_surface_resource_id_) {
27 ResourceProvider* resource_provider = 27 ResourceProvider* resource_provider =
28 layer_tree_impl()->resource_provider(); 28 layer_tree_impl()->resource_provider();
29 resource_provider->DeleteResource(io_surface_resource_id_); 29 resource_provider->DeleteResource(io_surface_resource_id_);
30 io_surface_resource_id_ = 0; 30 io_surface_resource_id_ = 0;
31 } 31 }
32 } 32 }
33 33
34 scoped_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl( 34 std::unique_ptr<LayerImpl> IOSurfaceLayerImpl::CreateLayerImpl(
35 LayerTreeImpl* tree_impl) { 35 LayerTreeImpl* tree_impl) {
36 return IOSurfaceLayerImpl::Create(tree_impl, id()); 36 return IOSurfaceLayerImpl::Create(tree_impl, id());
37 } 37 }
38 38
39 void IOSurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) { 39 void IOSurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) {
40 LayerImpl::PushPropertiesTo(layer); 40 LayerImpl::PushPropertiesTo(layer);
41 41
42 IOSurfaceLayerImpl* io_surface_layer = 42 IOSurfaceLayerImpl* io_surface_layer =
43 static_cast<IOSurfaceLayerImpl*>(layer); 43 static_cast<IOSurfaceLayerImpl*>(layer);
44 io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_); 44 io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 io_surface_id_ = io_surface_id; 100 io_surface_id_ = io_surface_id;
101 io_surface_size_ = size; 101 io_surface_size_ = size;
102 } 102 }
103 103
104 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { 104 const char* IOSurfaceLayerImpl::LayerTypeAsString() const {
105 return "cc::IOSurfaceLayerImpl"; 105 return "cc::IOSurfaceLayerImpl";
106 } 106 }
107 107
108 } // namespace cc 108 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/io_surface_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698