| 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 313 |
| 314 void ClearGLBindingsGL() { | 314 void ClearGLBindingsGL() { |
| 315 if (g_real_gl) { | 315 if (g_real_gl) { |
| 316 delete g_real_gl; | 316 delete g_real_gl; |
| 317 g_real_gl = NULL; | 317 g_real_gl = NULL; |
| 318 } | 318 } |
| 319 if (g_trace_gl) { | 319 if (g_trace_gl) { |
| 320 delete g_trace_gl; | 320 delete g_trace_gl; |
| 321 g_trace_gl = NULL; | 321 g_trace_gl = NULL; |
| 322 } | 322 } |
| 323 if (g_no_context_gl) { |
| 324 delete g_no_context_gl; |
| 325 g_no_context_gl = NULL; |
| 326 } |
| 323 g_gl = NULL; | 327 g_gl = NULL; |
| 324 g_driver_gl.ClearBindings(); | 328 g_driver_gl.ClearBindings(); |
| 325 if (g_current_gl_context_tls) { | 329 if (g_current_gl_context_tls) { |
| 326 delete g_current_gl_context_tls; | 330 delete g_current_gl_context_tls; |
| 327 g_current_gl_context_tls = NULL; | 331 g_current_gl_context_tls = NULL; |
| 328 } | 332 } |
| 329 if (g_version_info) { | 333 if (g_version_info) { |
| 330 delete g_version_info; | 334 delete g_version_info; |
| 331 g_version_info = NULL; | 335 g_version_info = NULL; |
| 332 } | 336 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { | 457 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { |
| 454 switch (name) { | 458 switch (name) { |
| 455 case GL_EXTENSIONS: | 459 case GL_EXTENSIONS: |
| 456 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); | 460 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); |
| 457 default: | 461 default: |
| 458 return driver_->fn.glGetStringFn(name); | 462 return driver_->fn.glGetStringFn(name); |
| 459 } | 463 } |
| 460 } | 464 } |
| 461 | 465 |
| 462 } // namespace gfx | 466 } // namespace gfx |
| OLD | NEW |