| OLD | NEW |
| 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 "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 return NULL; | 305 return NULL; |
| 306 | 306 |
| 307 return surface; | 307 return surface; |
| 308 } | 308 } |
| 309 case kGLImplementationEGLGLES2: { | 309 case kGLImplementationEGLGLES2: { |
| 310 DCHECK(window != gfx::kNullAcceleratedWidget); | 310 DCHECK(window != gfx::kNullAcceleratedWidget); |
| 311 scoped_refptr<NativeViewGLSurfaceEGL> surface( | 311 scoped_refptr<NativeViewGLSurfaceEGL> surface( |
| 312 new NativeViewGLSurfaceEGL(window)); | 312 new NativeViewGLSurfaceEGL(window)); |
| 313 scoped_ptr<VSyncProvider> sync_provider; | 313 scoped_ptr<VSyncProvider> sync_provider; |
| 314 sync_provider.reset(new WinVSyncProvider(window)); | 314 sync_provider.reset(new WinVSyncProvider(window)); |
| 315 if (!surface->Initialize(sync_provider.Pass())) | 315 if (!surface->Initialize(std::move(sync_provider))) |
| 316 return NULL; | 316 return NULL; |
| 317 | 317 |
| 318 return surface; | 318 return surface; |
| 319 } | 319 } |
| 320 case kGLImplementationDesktopGL: { | 320 case kGLImplementationDesktopGL: { |
| 321 scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceWGL( | 321 scoped_refptr<GLSurface> surface(new NativeViewGLSurfaceWGL( |
| 322 window)); | 322 window)); |
| 323 if (!surface->Initialize()) | 323 if (!surface->Initialize()) |
| 324 return NULL; | 324 return NULL; |
| 325 | 325 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 NOTREACHED(); | 365 NOTREACHED(); |
| 366 return NULL; | 366 return NULL; |
| 367 } | 367 } |
| 368 } | 368 } |
| 369 | 369 |
| 370 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 370 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
| 371 return GetDC(NULL); | 371 return GetDC(NULL); |
| 372 } | 372 } |
| 373 | 373 |
| 374 } // namespace gfx | 374 } // namespace gfx |
| OLD | NEW |