| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 g_gl = NULL; | 189 g_gl = NULL; |
| 190 g_current_gl_context = NULL; | 190 g_current_gl_context = NULL; |
| 191 g_driver_gl.ClearBindings(); | 191 g_driver_gl.ClearBindings(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 GLApi::GLApi() { | 194 GLApi::GLApi() { |
| 195 } | 195 } |
| 196 | 196 |
| 197 GLApi::~GLApi() { | 197 GLApi::~GLApi() { |
| 198 if (GetCurrentGLApi() == this) |
| 199 SetGLApi(NULL); |
| 198 } | 200 } |
| 199 | 201 |
| 200 GLApiBase::GLApiBase() | 202 GLApiBase::GLApiBase() |
| 201 : driver_(NULL) { | 203 : driver_(NULL) { |
| 202 } | 204 } |
| 203 | 205 |
| 204 GLApiBase::~GLApiBase() { | 206 GLApiBase::~GLApiBase() { |
| 205 } | 207 } |
| 206 | 208 |
| 207 void GLApiBase::InitializeBase(DriverGL* driver) { | 209 void GLApiBase::InitializeBase(DriverGL* driver) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { | 306 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { |
| 305 switch (name) { | 307 switch (name) { |
| 306 case GL_EXTENSIONS: | 308 case GL_EXTENSIONS: |
| 307 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); | 309 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); |
| 308 default: | 310 default: |
| 309 return driver_->fn.glGetStringFn(name); | 311 return driver_->fn.glGetStringFn(name); |
| 310 } | 312 } |
| 311 } | 313 } |
| 312 | 314 |
| 313 } // namespace gfx | 315 } // namespace gfx |
| OLD | NEW |