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

Unified Diff: gpu/command_buffer/tests/gl_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_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_unittest.cc b/gpu/command_buffer/tests/gl_unittest.cc
index 8a713fccad59b06e1dd63ee1788a09b7bc69297b..cd9373e2ce00666ee6f1c3b5d7320f9998c45df5 100644
--- a/gpu/command_buffer/tests/gl_unittest.cc
+++ b/gpu/command_buffer/tests/gl_unittest.cc
@@ -32,7 +32,7 @@ TEST_F(GLTest, Basic) {
uint8_t expected[] = {
0, 255, 0, 255,
};
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected, nullptr));
GLTestHelper::CheckGLError("no errors", __LINE__);
}
@@ -61,7 +61,7 @@ TEST_F(GLTest, BasicFBO) {
uint8_t expected[] = {
0, 255, 0, 255,
};
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 16, 16, 0, expected));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 16, 16, 0, expected, nullptr));
glDeleteFramebuffers(1, &fbo);
glDeleteTextures(1, &tex);
GLTestHelper::CheckGLError("no errors", __LINE__);
@@ -92,12 +92,13 @@ TEST_F(GLTest, SimpleShader) {
};
glClearColor(0.5f, 0.0f, 1.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT);
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 1, expected_clear));
+ EXPECT_TRUE(
+ GLTestHelper::CheckPixels(0, 0, 1, 1, 1, expected_clear, nullptr));
uint8_t expected_draw[] = {
0, 255, 0, 255,
};
glDrawArrays(GL_TRIANGLES, 0, 6);
- EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_draw));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_draw, nullptr));
}
TEST_F(GLTest, FeatureFlagsMatchCapabilities) {
« no previous file with comments | « gpu/command_buffer/tests/gl_texture_storage_unittest.cc ('k') | gpu/command_buffer/tests/gl_virtual_contexts_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698