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

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

Issue 220913004: Fix leak on shutdown from r261153 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698