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

Side by Side Diff: ui/ozone/platform/dri/gbm_surface_factory.cc

Issue 922923002: ui: Cleanup the usage of scoped_ptr throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 10 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 | « ui/ozone/platform/dri/dri_surface_factory.cc ('k') | ui/ozone/platform/dri/gbm_surfaceless.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/ozone/platform/dri/gbm_surface_factory.h" 5 #include "ui/ozone/platform/dri/gbm_surface_factory.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 return surface.Pass(); 132 return surface.Pass();
133 } 133 }
134 134
135 scoped_ptr<SurfaceOzoneEGL> 135 scoped_ptr<SurfaceOzoneEGL>
136 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget( 136 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget(
137 gfx::AcceleratedWidget widget) { 137 gfx::AcceleratedWidget widget) {
138 if (!allow_surfaceless_) 138 if (!allow_surfaceless_)
139 return nullptr; 139 return nullptr;
140 140
141 return scoped_ptr<SurfaceOzoneEGL>( 141 return make_scoped_ptr(
142 new GbmSurfaceless(window_manager_->GetWindowDelegate(widget))); 142 new GbmSurfaceless(window_manager_->GetWindowDelegate(widget)));
143 } 143 }
144 144
145 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap( 145 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
146 gfx::AcceleratedWidget widget, 146 gfx::AcceleratedWidget widget,
147 gfx::Size size, 147 gfx::Size size,
148 BufferFormat format, 148 BufferFormat format,
149 BufferUsage usage) { 149 BufferUsage usage) {
150 if (usage == MAP) 150 if (usage == MAP)
151 return nullptr; 151 return nullptr;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return false; 213 return false;
214 } 214 }
215 215
216 scoped_refptr<GbmWrapper> GbmSurfaceFactory::GetGbmDevice( 216 scoped_refptr<GbmWrapper> GbmSurfaceFactory::GetGbmDevice(
217 gfx::AcceleratedWidget widget) { 217 gfx::AcceleratedWidget widget) {
218 return static_cast<GbmWrapper*>( 218 return static_cast<GbmWrapper*>(
219 drm_device_manager_->GetDrmDevice(widget).get()); 219 drm_device_manager_->GetDrmDevice(widget).get());
220 } 220 }
221 221
222 } // namespace ui 222 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.cc ('k') | ui/ozone/platform/dri/gbm_surfaceless.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698