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

Side by Side Diff: gpu/command_buffer/service/program_manager_unittest.cc

Issue 11266023: Make GL calls go through subclassable class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « gpu/command_buffer/service/program_manager.cc ('k') | ui/gl/generate_bindings.py » ('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 "gpu/command_buffer/service/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 0, 1280 0,
1281 service_program_id); 1281 service_program_id);
1282 } 1282 }
1283 1283
1284 void SetExpectationsForProgramLink() { 1284 void SetExpectationsForProgramLink() {
1285 SetExpectationsForProgramLink(kServiceProgramId); 1285 SetExpectationsForProgramLink(kServiceProgramId);
1286 } 1286 }
1287 1287
1288 void SetExpectationsForProgramLink(GLuint service_program_id) { 1288 void SetExpectationsForProgramLink(GLuint service_program_id) {
1289 TestHelper::SetupShader(gl_.get(), NULL, 0, NULL, 0, service_program_id); 1289 TestHelper::SetupShader(gl_.get(), NULL, 0, NULL, 0, service_program_id);
1290 if (gfx::g_GL_ARB_get_program_binary) { 1290 if (gfx::g_driver_gl.ext.b_GL_ARB_get_program_binary) {
1291 EXPECT_CALL(*gl_.get(), 1291 EXPECT_CALL(*gl_.get(),
1292 ProgramParameteri(service_program_id, 1292 ProgramParameteri(service_program_id,
1293 PROGRAM_BINARY_RETRIEVABLE_HINT, 1293 PROGRAM_BINARY_RETRIEVABLE_HINT,
1294 GL_TRUE)).Times(1); 1294 GL_TRUE)).Times(1);
1295 } 1295 }
1296 } 1296 }
1297 1297
1298 void SetExpectationsForSuccessCompile( 1298 void SetExpectationsForSuccessCompile(
1299 const ShaderManager::ShaderInfo* shader) { 1299 const ShaderManager::ShaderInfo* shader) {
1300 const GLuint shader_id = shader->service_id(); 1300 const GLuint shader_id = shader->service_id();
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 SetExpectationsForProgramCached(program_info, 1519 SetExpectationsForProgramCached(program_info,
1520 new_vertex_shader, 1520 new_vertex_shader,
1521 fragment_shader_); 1521 fragment_shader_);
1522 SetExpectationsForProgramLink(kNewProgramServiceId); 1522 SetExpectationsForProgramLink(kNewProgramServiceId);
1523 1523
1524 EXPECT_TRUE(program_info->Link(&shader_manager_, NULL, NULL, info.get())); 1524 EXPECT_TRUE(program_info->Link(&shader_manager_, NULL, NULL, info.get()));
1525 } 1525 }
1526 1526
1527 } // namespace gles2 1527 } // namespace gles2
1528 } // namespace gpu 1528 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | ui/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698