| 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_wgl_api_implementation.h" | 5 #include "ui/gl/gl_wgl_api_implementation.h" |
| 6 #include "ui/gl/gl_implementation.h" | 6 #include "ui/gl/gl_implementation.h" |
| 7 | 7 |
| 8 namespace gfx { | 8 namespace gfx { |
| 9 | 9 |
| 10 RealWGLApi* g_real_wgl; | 10 RealWGLApi* g_real_wgl; |
| 11 | 11 |
| 12 void InitializeGLBindingsWGL() { | 12 void InitializeGLBindingsWGL() { |
| 13 g_driver_wgl.InitializeBindings(); | 13 g_driver_wgl.InitializeBindings(); |
| 14 if (!g_real_wgl) { | 14 if (!g_real_wgl) { |
| 15 g_real_wgl = new RealWGLApi(); | 15 g_real_wgl = new RealWGLApi(); |
| 16 } | 16 } |
| 17 g_real_wgl->Initialize(&g_driver_wgl); | 17 g_real_wgl->Initialize(&g_driver_wgl); |
| 18 g_current_wgl_context = g_real_wgl; | 18 g_current_wgl_context = g_real_wgl; |
| 19 } | 19 } |
| 20 | 20 |
| 21 void InitializeGLExtensionBindingsWGL(GLContext* context) { | 21 void InitializeGLExtensionBindingsWGL(GLContext* context) { |
| 22 g_driver_wgl.InitializeExtensionBindings(context); | 22 g_driver_wgl.InitializeExtensionBindings(context); |
| 23 } | 23 } |
| 24 | 24 |
| 25 void InitializeDebugGLBindingsWGL() { | |
| 26 g_driver_wgl.InitializeDebugBindings(); | |
| 27 } | |
| 28 | |
| 29 void ClearGLBindingsWGL() { | 25 void ClearGLBindingsWGL() { |
| 30 if (g_real_wgl) { | 26 if (g_real_wgl) { |
| 31 delete g_real_wgl; | 27 delete g_real_wgl; |
| 32 g_real_wgl = NULL; | 28 g_real_wgl = NULL; |
| 33 } | 29 } |
| 34 g_current_wgl_context = NULL; | 30 g_current_wgl_context = NULL; |
| 35 g_driver_wgl.ClearBindings(); | 31 g_driver_wgl.ClearBindings(); |
| 36 } | 32 } |
| 37 | 33 |
| 38 WGLApi::WGLApi() { | 34 WGLApi::WGLApi() { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 69 const char* extensions = wglGetExtensionsStringEXT(); | 65 const char* extensions = wglGetExtensionsStringEXT(); |
| 70 *info = GLWindowSystemBindingInfo(); | 66 *info = GLWindowSystemBindingInfo(); |
| 71 if (extensions) | 67 if (extensions) |
| 72 info->extensions = extensions; | 68 info->extensions = extensions; |
| 73 return true; | 69 return true; |
| 74 } | 70 } |
| 75 | 71 |
| 76 } // namespace gfx | 72 } // namespace gfx |
| 77 | 73 |
| 78 | 74 |
| OLD | NEW |