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

Unified Diff: gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_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_chromium_framebuffer_multisample_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc b/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc
index ece687101baf0a1494b1c8f223c76535d6e540ce..96b9fc80359597b50b116bd53f60a54ac93bb479 100644
--- a/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc
+++ b/gpu/command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc
@@ -100,15 +100,8 @@ TEST_F(GLChromiumFramebufferMultisampleTest, DrawAndResolve) {
GLuint resolve_fbo, resolve_tex;
glGenTextures(1, &resolve_tex);
glBindTexture(GL_TEXTURE_2D, resolve_tex);
- glTexImage2D(GL_TEXTURE_2D,
- 0,
- GL_RGBA,
- width,
- height,
- 0,
- GL_RGBA,
- GL_UNSIGNED_BYTE,
- NULL);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA,
+ GL_UNSIGNED_BYTE, nullptr);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -150,9 +143,9 @@ TEST_F(GLChromiumFramebufferMultisampleTest, DrawAndResolve) {
const uint8_t green[] = {0, 255, 0, 255};
const uint8_t black[] = {0, 0, 0, 0};
glBindFramebuffer(GL_READ_FRAMEBUFFER, resolve_fbo);
- EXPECT_TRUE(
- GLTestHelper::CheckPixels(width / 4, (3 * height) / 4, 1, 1, 0, green));
- EXPECT_TRUE(GLTestHelper::CheckPixels(width - 1, 0, 1, 1, 0, black));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(width / 4, (3 * height) / 4, 1, 1, 0,
+ green, nullptr));
+ EXPECT_TRUE(GLTestHelper::CheckPixels(width - 1, 0, 1, 1, 0, black, nullptr));
}
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698