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_gl_api_implementation.h" | 5 #include "ui/gl/gl_gl_api_implementation.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 void SetGLToRealGLApi() { | 283 void SetGLToRealGLApi() { |
284 SetGLApi(g_gl); | 284 SetGLApi(g_gl); |
285 } | 285 } |
286 | 286 |
287 void SetGLApiToNoContext() { | 287 void SetGLApiToNoContext() { |
288 SetGLApi(g_no_context_gl); | 288 SetGLApi(g_no_context_gl); |
289 } | 289 } |
290 | 290 |
| 291 const GLVersionInfo* GetGLVersionInfo() { |
| 292 return g_version_info; |
| 293 } |
| 294 |
291 void InitializeDynamicGLBindingsGL(GLContext* context) { | 295 void InitializeDynamicGLBindingsGL(GLContext* context) { |
292 g_driver_gl.InitializeCustomDynamicBindings(context); | 296 g_driver_gl.InitializeCustomDynamicBindings(context); |
293 DCHECK(context && context->IsCurrent(NULL) && !g_version_info); | 297 DCHECK(context && context->IsCurrent(NULL) && !g_version_info); |
294 g_version_info = new GLVersionInfo(context->GetGLVersion().c_str(), | 298 g_version_info = new GLVersionInfo(context->GetGLVersion().c_str(), |
295 context->GetGLRenderer().c_str()); | 299 context->GetGLRenderer().c_str()); |
296 } | 300 } |
297 | 301 |
298 void InitializeDebugGLBindingsGL() { | 302 void InitializeDebugGLBindingsGL() { |
299 g_driver_gl.InitializeDebugBindings(); | 303 g_driver_gl.InitializeDebugBindings(); |
300 } | 304 } |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 GLApiBase::glFlushFn(); | 486 GLApiBase::glFlushFn(); |
483 GLApiBase::SignalFlush(); | 487 GLApiBase::SignalFlush(); |
484 } | 488 } |
485 | 489 |
486 void VirtualGLApi::glFinishFn() { | 490 void VirtualGLApi::glFinishFn() { |
487 GLApiBase::glFinishFn(); | 491 GLApiBase::glFinishFn(); |
488 GLApiBase::SignalFlush(); | 492 GLApiBase::SignalFlush(); |
489 } | 493 } |
490 | 494 |
491 } // namespace gfx | 495 } // namespace gfx |
OLD | NEW |