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

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

Issue 132473009: Allow tests to stub out GL draw calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stubglbindings: nulldraw Created 6 years, 11 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 | « ui/gl/gl_gl_api_implementation.h ('k') | ui/gl/gl_implementation.h » ('j') | 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 void InitializeGLExtensionBindingsGL(GLContext* context) { 198 void InitializeGLExtensionBindingsGL(GLContext* context) {
199 g_driver_gl.InitializeExtensions(context); 199 g_driver_gl.InitializeExtensions(context);
200 } 200 }
201 201
202 void InitializeDebugGLBindingsGL() { 202 void InitializeDebugGLBindingsGL() {
203 g_driver_gl.InitializeDebugBindings(); 203 g_driver_gl.InitializeDebugBindings();
204 } 204 }
205 205
206 void InitializeNullDrawGLBindingsGL() {
207 g_driver_gl.InitializeNullDrawBindings();
208 }
209
206 void ClearGLBindingsGL() { 210 void ClearGLBindingsGL() {
207 if (g_real_gl) { 211 if (g_real_gl) {
208 delete g_real_gl; 212 delete g_real_gl;
209 g_real_gl = NULL; 213 g_real_gl = NULL;
210 } 214 }
211 if (g_trace_gl) { 215 if (g_trace_gl) {
212 delete g_trace_gl; 216 delete g_trace_gl;
213 g_trace_gl = NULL; 217 g_trace_gl = NULL;
214 } 218 }
215 g_gl = NULL; 219 g_gl = NULL;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { 339 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) {
336 switch (name) { 340 switch (name) {
337 case GL_EXTENSIONS: 341 case GL_EXTENSIONS:
338 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); 342 return reinterpret_cast<const GLubyte*>(extensions_.c_str());
339 default: 343 default:
340 return driver_->fn.glGetStringFn(name); 344 return driver_->fn.glGetStringFn(name);
341 } 345 }
342 } 346 }
343 347
344 } // namespace gfx 348 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_gl_api_implementation.h ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698