Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: ui/gl/gl_gl_api_implementation.cc

Issue 16838007: Ensure real GL Api is set before making GL calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« ui/gl/gl_context_cgl.cc ('K') | « ui/gl/gl_context_wgl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« ui/gl/gl_context_cgl.cc ('K') | « ui/gl/gl_context_wgl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698