| 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_glx_api_implementation.h" | 5 #include "ui/gl/gl_glx_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 RealGLXApi* g_real_glx; | 10 RealGLXApi* g_real_glx; |
| 11 | 11 |
| 12 void InitializeStaticGLBindingsGLX() { | 12 void InitializeStaticGLBindingsGLX() { |
| 13 g_driver_glx.InitializeStaticBindings(); | 13 g_driver_glx.InitializeStaticBindings(); |
| 14 if (!g_real_glx) { | 14 if (!g_real_glx) { |
| 15 g_real_glx = new RealGLXApi(); | 15 g_real_glx = new RealGLXApi(); |
| 16 } | 16 } |
| 17 g_real_glx->Initialize(&g_driver_glx); | 17 g_real_glx->Initialize(&g_driver_glx); |
| 18 g_current_glx_context = g_real_glx; | 18 g_current_glx_context = g_real_glx; |
| 19 g_driver_glx.InitializeExtensionBindings(); |
| 19 } | 20 } |
| 20 | 21 |
| 21 void InitializeDebugGLBindingsGLX() { | 22 void InitializeDebugGLBindingsGLX() { |
| 22 g_driver_glx.InitializeDebugBindings(); | 23 g_driver_glx.InitializeDebugBindings(); |
| 23 } | 24 } |
| 24 | 25 |
| 25 void ClearGLBindingsGLX() { | 26 void ClearGLBindingsGLX() { |
| 26 if (g_real_glx) { | 27 if (g_real_glx) { |
| 27 delete g_real_glx; | 28 delete g_real_glx; |
| 28 g_real_glx = NULL; | 29 g_real_glx = NULL; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 info->version = version; | 78 info->version = version; |
| 78 if (extensions) | 79 if (extensions) |
| 79 info->extensions = extensions; | 80 info->extensions = extensions; |
| 80 info->direct_rendering = !!glXIsDirect(display, glXGetCurrentContext()); | 81 info->direct_rendering = !!glXIsDirect(display, glXGetCurrentContext()); |
| 81 return true; | 82 return true; |
| 82 } | 83 } |
| 83 | 84 |
| 84 } // namespace gfx | 85 } // namespace gfx |
| 85 | 86 |
| 86 | 87 |
| OLD | NEW |