| OLD | NEW |
| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(USE_EGL) | 7 #if defined(USE_EGL) |
| 8 #include <EGL/egl.h> | 8 #include <EGL/egl.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include "ui/gl/gl_bindings.h" | 11 #include "ui/gl/gl_bindings.h" |
| 12 | 12 |
| 13 #if defined(USE_GLX) | 13 #if defined(USE_GLX) |
| 14 #include "ui/gfx/x/x11_types.h" // nogncheck | 14 #include "ui/gfx/x/x11_types.h" // nogncheck |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
| 18 #include "ui/gl/gl_surface_wgl.h" | 18 #include "ui/gl/gl_surface_wgl.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 #if defined(USE_EGL) | 21 #if defined(USE_EGL) |
| 22 #include "ui/gl/gl_surface_egl.h" | 22 #include "ui/gl/gl_surface_egl.h" |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 namespace gfx { | 25 namespace gl { |
| 26 | 26 |
| 27 std::string DriverOSMESA::GetPlatformExtensions() { | 27 std::string DriverOSMESA::GetPlatformExtensions() { |
| 28 return ""; | 28 return ""; |
| 29 } | 29 } |
| 30 | 30 |
| 31 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
| 32 std::string DriverWGL::GetPlatformExtensions() { | 32 std::string DriverWGL::GetPlatformExtensions() { |
| 33 const char* str = nullptr; | 33 const char* str = nullptr; |
| 34 str = wglGetExtensionsStringARB(GLSurfaceWGL::GetDisplayDC()); | 34 str = wglGetExtensionsStringARB(GLSurfaceWGL::GetDisplayDC()); |
| 35 if (str) | 35 if (str) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 54 } | 54 } |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 #if defined(USE_GLX) | 57 #if defined(USE_GLX) |
| 58 std::string DriverGLX::GetPlatformExtensions() { | 58 std::string DriverGLX::GetPlatformExtensions() { |
| 59 const char* str = glXQueryExtensionsString(gfx::GetXDisplay(), 0); | 59 const char* str = glXQueryExtensionsString(gfx::GetXDisplay(), 0); |
| 60 return str ? std::string(str) : ""; | 60 return str ? std::string(str) : ""; |
| 61 } | 61 } |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 } // namespace gfx | 64 } // namespace gl |
| OLD | NEW |