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

Unified Diff: gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_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_apply_screen_space_antialiasing_CHROMIUM_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc
index 04bb9e98a18d75bc846393e9253de0391345eb06..9a516a2db0f4241119d9d243cd4ff8afbbb6095f 100644
--- a/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc
+++ b/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc
@@ -120,7 +120,7 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, MAYBE_Basic) {
glCheckFramebufferStatus(GL_FRAMEBUFFER));
uint8_t pixels[1 * 4] = {0u, 255u, 0u, 255u};
- GLTestHelper::CheckPixels(0, 0, 1, 1, 0, pixels);
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 0, pixels, nullptr);
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
}
@@ -159,7 +159,7 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, InternalFormat) {
<< index;
uint8_t pixels[1 * 4] = {0u, 255u, 0u, 255u};
- GLTestHelper::CheckPixels(0, 0, 1, 1, 0, pixels);
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 0, pixels, nullptr);
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
}
}
@@ -188,7 +188,7 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, ImmutableTexture) {
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
uint8_t pixels[1 * 4] = {0u, 255u, 0u, 255u};
- GLTestHelper::CheckPixels(0, 0, 1, 1, 0, pixels);
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 0, pixels, nullptr);
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
}
}
@@ -219,18 +219,18 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, AntiAliasing) {
uint8_t transparent[4] = {0u, 0u, 0u, 0u};
uint8_t red[4] = {255u, 0u, 0u, 255u};
- GLTestHelper::CheckPixels(0, 0, 1, 1, 0, red);
- GLTestHelper::CheckPixels(0, 1, 1, 1, 0, red);
- GLTestHelper::CheckPixels(0, 2, 1, 1, 0, transparent);
- GLTestHelper::CheckPixels(1, 0, 1, 1, 0, red);
- GLTestHelper::CheckPixels(1, 1, 1, 1, 0, transparent);
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 0, red, nullptr);
+ GLTestHelper::CheckPixels(0, 1, 1, 1, 0, red, nullptr);
+ GLTestHelper::CheckPixels(0, 2, 1, 1, 0, transparent, nullptr);
+ GLTestHelper::CheckPixels(1, 0, 1, 1, 0, red, nullptr);
+ GLTestHelper::CheckPixels(1, 1, 1, 1, 0, transparent, nullptr);
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
glApplyScreenSpaceAntialiasingCHROMIUM();
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
- GLTestHelper::CheckPixels(0, 0, 1, 1, 0, red);
- GLTestHelper::CheckPixels(2, 2, 1, 1, 0, transparent);
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 0, red, nullptr);
+ GLTestHelper::CheckPixels(2, 2, 1, 1, 0, transparent, nullptr);
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
// Check if middle pixel is anti-aliased.
@@ -394,9 +394,9 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, ProgramStatePreservation) {
};
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, zero));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, zero, nullptr));
glDrawArrays(GL_TRIANGLES, 0, 6);
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected, nullptr));
// Call copyTextureCHROMIUM
uint8_t pixels[1 * 4] = {255u, 0u, 0u, 255u};
@@ -409,9 +409,9 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, ProgramStatePreservation) {
// test using program after
glClear(GL_COLOR_BUFFER_BIT);
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, zero));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, zero, nullptr));
glDrawArrays(GL_TRIANGLES, 0, 6);
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected, nullptr));
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
« no previous file with comments | « gpu/command_buffer/tests/compressed_texture_test.cc ('k') | gpu/command_buffer/tests/gl_bind_uniform_location_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698