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

Side by Side Diff: ui/gl/gl_surface_win.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/gl/gl_surface_wgl.cc ('k') | ui/gl/gl_surface_x11.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/gl/gl_surface.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 8
9 #include <memory>
10
9 #include "base/command_line.h" 11 #include "base/command_line.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/trace_event/trace_event.h" 14 #include "base/trace_event/trace_event.h"
14 #include "base/win/windows_version.h" 15 #include "base/win/windows_version.h"
15 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
16 #include "ui/gl/gl_bindings.h" 17 #include "ui/gl/gl_bindings.h"
17 #include "ui/gl/gl_implementation.h" 18 #include "ui/gl/gl_implementation.h"
18 #include "ui/gl/gl_surface_egl.h" 19 #include "ui/gl/gl_surface_egl.h"
19 #include "ui/gl/gl_surface_osmesa.h" 20 #include "ui/gl/gl_surface_osmesa.h"
20 #include "ui/gl/gl_surface_stub.h" 21 #include "ui/gl/gl_surface_stub.h"
21 #include "ui/gl/gl_surface_wgl.h" 22 #include "ui/gl/gl_surface_wgl.h"
22 #include "ui/gl/vsync_provider_win.h" 23 #include "ui/gl/vsync_provider_win.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 new NativeViewGLSurfaceOSMesa(window)); 203 new NativeViewGLSurfaceOSMesa(window));
203 if (!surface->Initialize()) 204 if (!surface->Initialize())
204 return NULL; 205 return NULL;
205 206
206 return surface; 207 return surface;
207 } 208 }
208 case kGLImplementationEGLGLES2: { 209 case kGLImplementationEGLGLES2: {
209 DCHECK(window != gfx::kNullAcceleratedWidget); 210 DCHECK(window != gfx::kNullAcceleratedWidget);
210 scoped_refptr<NativeViewGLSurfaceEGL> surface( 211 scoped_refptr<NativeViewGLSurfaceEGL> surface(
211 new NativeViewGLSurfaceEGL(window)); 212 new NativeViewGLSurfaceEGL(window));
212 scoped_ptr<VSyncProvider> sync_provider; 213 std::unique_ptr<VSyncProvider> sync_provider;
213 sync_provider.reset(new VSyncProviderWin(window)); 214 sync_provider.reset(new VSyncProviderWin(window));
214 if (!surface->Initialize(std::move(sync_provider))) 215 if (!surface->Initialize(std::move(sync_provider)))
215 return NULL; 216 return NULL;
216 217
217 return surface; 218 return surface;
218 } 219 }
219 case kGLImplementationDesktopGL: { 220 case kGLImplementationDesktopGL: {
220 scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceWGL( 221 scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceWGL(
221 window)); 222 window));
222 if (!surface->Initialize()) 223 if (!surface->Initialize())
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 NOTREACHED(); 265 NOTREACHED();
265 return NULL; 266 return NULL;
266 } 267 }
267 } 268 }
268 269
269 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 270 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
270 return GetDC(NULL); 271 return GetDC(NULL);
271 } 272 }
272 273
273 } // namespace gfx 274 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_wgl.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698