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

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

Issue 855023003: Add presubmit check for scoped_ptr usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 if (!surface->Initialize()) 127 if (!surface->Initialize())
128 return nullptr; 128 return nullptr;
129 129
130 return surface.Pass(); 130 return surface.Pass();
131 } 131 }
132 132
133 scoped_ptr<SurfaceOzoneEGL> 133 scoped_ptr<SurfaceOzoneEGL>
134 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget( 134 GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget(
135 gfx::AcceleratedWidget widget) { 135 gfx::AcceleratedWidget widget) {
136 if (!allow_surfaceless_) 136 if (!allow_surfaceless_)
137 return scoped_ptr<SurfaceOzoneEGL>(); 137 return nullptr;
138 138
139 DriWindowDelegate* delegate = GetOrCreateWindowDelegate(widget); 139 DriWindowDelegate* delegate = GetOrCreateWindowDelegate(widget);
140 return scoped_ptr<SurfaceOzoneEGL>(new GbmSurfaceless(delegate)); 140 return scoped_ptr<SurfaceOzoneEGL>(new GbmSurfaceless(delegate));
141 } 141 }
142 142
143 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap( 143 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
144 gfx::AcceleratedWidget widget, 144 gfx::AcceleratedWidget widget,
145 gfx::Size size, 145 gfx::Size size,
146 BufferFormat format, 146 BufferFormat format,
147 BufferUsage usage) { 147 BufferUsage usage) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 scoped_ptr<DriWindowDelegate> delegate(new DriWindowDelegateImpl( 214 scoped_ptr<DriWindowDelegate> delegate(new DriWindowDelegateImpl(
215 widget, gbm_, window_manager_, screen_manager_)); 215 widget, gbm_, window_manager_, screen_manager_));
216 delegate->Initialize(); 216 delegate->Initialize();
217 window_manager_->AddWindowDelegate(widget, delegate.Pass()); 217 window_manager_->AddWindowDelegate(widget, delegate.Pass());
218 } 218 }
219 219
220 return window_manager_->GetWindowDelegate(widget); 220 return window_manager_->GetWindowDelegate(widget);
221 } 221 }
222 222
223 } // namespace ui 223 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/caca/caca_window_manager.cc ('k') | ui/ozone/platform/dri/hardware_display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698