| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/init/gl_initializer.h" | 5 #include "ui/gl/init/gl_initializer.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> |
| 8 |
| 7 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 8 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| 9 #include "base/bind.h" | 11 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 11 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 12 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 13 #include "base/logging.h" | 15 #include "base/logging.h" |
| 14 #include "base/native_library.h" | 16 #include "base/native_library.h" |
| 15 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 16 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 VSyncProviderWin::InitializeOneOff(); | 258 VSyncProviderWin::InitializeOneOff(); |
| 257 | 259 |
| 258 switch (GetGLImplementation()) { | 260 switch (GetGLImplementation()) { |
| 259 case kGLImplementationDesktopGL: | 261 case kGLImplementationDesktopGL: |
| 260 if (!GLSurfaceWGL::InitializeOneOff()) { | 262 if (!GLSurfaceWGL::InitializeOneOff()) { |
| 261 LOG(ERROR) << "GLSurfaceWGL::InitializeOneOff failed."; | 263 LOG(ERROR) << "GLSurfaceWGL::InitializeOneOff failed."; |
| 262 return false; | 264 return false; |
| 263 } | 265 } |
| 264 break; | 266 break; |
| 265 case kGLImplementationEGLGLES2: | 267 case kGLImplementationEGLGLES2: |
| 266 if (!GLSurfaceEGL::InitializeOneOff()) { | 268 if (!GLSurfaceEGL::InitializeOneOff(GetDC(nullptr))) { |
| 267 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; | 269 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; |
| 268 return false; | 270 return false; |
| 269 } | 271 } |
| 270 break; | 272 break; |
| 271 case kGLImplementationOSMesaGL: | 273 case kGLImplementationOSMesaGL: |
| 272 case kGLImplementationMockGL: | 274 case kGLImplementationMockGL: |
| 273 break; | 275 break; |
| 274 default: | 276 default: |
| 275 NOTREACHED(); | 277 NOTREACHED(); |
| 276 } | 278 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 } | 323 } |
| 322 | 324 |
| 323 ClearGLBindingsEGL(); | 325 ClearGLBindingsEGL(); |
| 324 ClearGLBindingsGL(); | 326 ClearGLBindingsGL(); |
| 325 ClearGLBindingsOSMESA(); | 327 ClearGLBindingsOSMESA(); |
| 326 ClearGLBindingsWGL(); | 328 ClearGLBindingsWGL(); |
| 327 } | 329 } |
| 328 | 330 |
| 329 } // namespace init | 331 } // namespace init |
| 330 } // namespace gl | 332 } // namespace gl |
| OLD | NEW |