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

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

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 10 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 nullptr, 0, service_program_id); 2184 nullptr, 0, service_program_id);
2185 } 2185 }
2186 2186
2187 void SetExpectationsForProgramLink() { 2187 void SetExpectationsForProgramLink() {
2188 SetExpectationsForProgramLink(kServiceProgramId); 2188 SetExpectationsForProgramLink(kServiceProgramId);
2189 } 2189 }
2190 2190
2191 void SetExpectationsForProgramLink(GLuint service_program_id) { 2191 void SetExpectationsForProgramLink(GLuint service_program_id) {
2192 TestHelper::SetupShaderExpectations(gl_.get(), feature_info_.get(), nullptr, 2192 TestHelper::SetupShaderExpectations(gl_.get(), feature_info_.get(), nullptr,
2193 0, nullptr, 0, service_program_id); 2193 0, nullptr, 0, service_program_id);
2194 if (gl::g_driver_gl.ext.b_GL_ARB_get_program_binary) { 2194 if (gl::g_current_gl_driver->ext.b_GL_ARB_get_program_binary) {
2195 EXPECT_CALL(*gl_.get(), 2195 EXPECT_CALL(*gl_.get(),
2196 ProgramParameteri(service_program_id, 2196 ProgramParameteri(service_program_id,
2197 PROGRAM_BINARY_RETRIEVABLE_HINT, 2197 PROGRAM_BINARY_RETRIEVABLE_HINT,
2198 GL_TRUE)).Times(1); 2198 GL_TRUE)).Times(1);
2199 } 2199 }
2200 } 2200 }
2201 2201
2202 void SetExpectationsForSuccessCompile( 2202 void SetExpectationsForSuccessCompile(
2203 const Shader* shader) { 2203 const Shader* shader) {
2204 const GLuint shader_id = shader->service_id(); 2204 const GLuint shader_id = shader->service_id();
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 ProgramManagerDualSourceBlendingES2Test, 2513 ProgramManagerDualSourceBlendingES2Test,
2514 testing::Values( 2514 testing::Values(
2515 make_gl_ext_tuple("3.2", 2515 make_gl_ext_tuple("3.2",
2516 "GL_ARB_draw_buffers GL_ARB_blend_func_extended " 2516 "GL_ARB_draw_buffers GL_ARB_blend_func_extended "
2517 "GL_ARB_program_interface_query"), 2517 "GL_ARB_program_interface_query"),
2518 make_gl_ext_tuple("opengl es 3.1", 2518 make_gl_ext_tuple("opengl es 3.1",
2519 "GL_EXT_draw_buffers GL_EXT_blend_func_extended"))); 2519 "GL_EXT_draw_buffers GL_EXT_blend_func_extended")));
2520 2520
2521 } // namespace gles2 2521 } // namespace gles2
2522 } // namespace gpu 2522 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698