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

Unified Diff: gpu/command_buffer/tests/gl_program_unittest.cc

Issue 2602563002: Refactor DrawTextureQuad and CheckPixels in gl_tests util (Closed)
Patch Set: rebase only Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/tests/gl_program_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_program_unittest.cc b/gpu/command_buffer/tests/gl_program_unittest.cc
index b5a790ec59a2a5ce1acc94fbf3381a225168cbd7..82f9cd9e7b44eb73777174bd1de0d9c4a4976b76 100644
--- a/gpu/command_buffer/tests/gl_program_unittest.cc
+++ b/gpu/command_buffer/tests/gl_program_unittest.cc
@@ -121,7 +121,7 @@ TEST_F(GLProgramTest, NewShaderInCurrentProgram) {
GLuint fs = GLTestHelper::LoadShader(GL_FRAGMENT_SHADER, f_red_shader_str);
GLuint program = GLTestHelper::SetupProgram(vs, fs);
glUseProgram(program);
- glShaderSource(fs, 1, &f_blue_shader_str, NULL);
+ glShaderSource(fs, 1, &f_blue_shader_str, nullptr);
glCompileShader(fs);
glLinkProgram(program);
// We specifically don't call UseProgram again.
@@ -131,7 +131,8 @@ TEST_F(GLProgramTest, NewShaderInCurrentProgram) {
uint8_t expected_color[] = {
0, 0, 255, 255,
};
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_color));
+ EXPECT_TRUE(
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_color, nullptr));
GLTestHelper::CheckGLError("no errors", __LINE__);
}
@@ -149,7 +150,7 @@ TEST_F(GLProgramTest, ShaderLengthSpecified) {
// Compiling invalid program should fail.
const char* invalid_shader_strings[] = { invalid_shader.c_str() };
GLuint vs = glCreateShader(GL_VERTEX_SHADER);
- glShaderSource(vs, 1, invalid_shader_strings, NULL);
+ glShaderSource(vs, 1, invalid_shader_strings, nullptr);
glCompileShader(vs);
GLint compile_state = 0;
@@ -199,7 +200,8 @@ TEST_F(GLProgramTest, UniformsInCurrentProgram) {
uint8_t expected_color[] = {
0, 0, 255, 255,
};
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_color));
+ EXPECT_TRUE(
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_color, nullptr));
GLTestHelper::CheckGLError("no errors", __LINE__);
}
« no previous file with comments | « gpu/command_buffer/tests/gl_pointcoord_unittest.cc ('k') | gpu/command_buffer/tests/gl_stream_draw_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698