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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 327 |
328 void SetGLApiToNoContext() { | 328 void SetGLApiToNoContext() { |
329 SetGLApi(g_no_context_gl); | 329 SetGLApi(g_no_context_gl); |
330 } | 330 } |
331 | 331 |
332 const GLVersionInfo* GetGLVersionInfo() { | 332 const GLVersionInfo* GetGLVersionInfo() { |
333 return g_version_info; | 333 return g_version_info; |
334 } | 334 } |
335 | 335 |
336 void InitializeDynamicGLBindingsGL(GLContext* context) { | 336 void InitializeDynamicGLBindingsGL(GLContext* context) { |
| 337 if (g_version_info) |
| 338 return; |
337 g_real_gl->InitializeFilteredExtensions(); | 339 g_real_gl->InitializeFilteredExtensions(); |
338 g_driver_gl.InitializeCustomDynamicBindings(context); | 340 g_driver_gl.InitializeCustomDynamicBindings(context); |
339 DCHECK(context && context->IsCurrent(NULL) && !g_version_info); | 341 DCHECK(context && context->IsCurrent(NULL) && !g_version_info); |
340 g_version_info = new GLVersionInfo( | 342 g_version_info = new GLVersionInfo( |
341 context->GetGLVersion().c_str(), | 343 context->GetGLVersion().c_str(), |
342 context->GetGLRenderer().c_str(), | 344 context->GetGLRenderer().c_str(), |
343 context->GetExtensions().c_str()); | 345 context->GetExtensions().c_str()); |
344 } | 346 } |
345 | 347 |
346 void InitializeDebugGLBindingsGL() { | 348 void InitializeDebugGLBindingsGL() { |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 611 |
610 void VirtualGLApi::glFlushFn() { | 612 void VirtualGLApi::glFlushFn() { |
611 GLApiBase::glFlushFn(); | 613 GLApiBase::glFlushFn(); |
612 } | 614 } |
613 | 615 |
614 void VirtualGLApi::glFinishFn() { | 616 void VirtualGLApi::glFinishFn() { |
615 GLApiBase::glFinishFn(); | 617 GLApiBase::glFinishFn(); |
616 } | 618 } |
617 | 619 |
618 } // namespace gfx | 620 } // namespace gfx |
OLD | NEW |