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 9bd77f044c8a8a476b36507c92f687c29b22a03e..04bb9e98a18d75bc846393e9253de0391345eb06 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 |
@@ -137,7 +137,8 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, InternalFormat) { |
if (!available_) |
return; |
- GLint formats[] = {GL_RGB, GL_RGBA}; |
+ GLint formats[] = {GL_RGB, GL_RGBA, GL_ALPHA, GL_LUMINANCE, |
+ GL_LUMINANCE_ALPHA}; |
for (size_t index = 0; index < arraysize(formats); index++) { |
glTexImage2D(GL_TEXTURE_2D, 0, formats[index], 1, 1, 0, formats[index], |
GL_UNSIGNED_BYTE, nullptr); |
@@ -146,7 +147,12 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, InternalFormat) { |
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, |
textures_, 0); |
+ // Only if the format is supported by FBO, supported by this extension. |
+ if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) |
+ continue; |
+ |
glClear(GL_COLOR_BUFFER_BIT); |
+ EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); |
glApplyScreenSpaceAntialiasingCHROMIUM(); |
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()) << "index:" |
@@ -158,29 +164,6 @@ TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, InternalFormat) { |
} |
} |
-TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, InternalFormatNotSupported) { |
- if (!available_) |
- return; |
- |
- // Check unsupported format reports error. |
- GLint unsupported_formats[] = {GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA}; |
- for (size_t index = 0; index < arraysize(unsupported_formats); index++) { |
- glTexImage2D(GL_TEXTURE_2D, 0, unsupported_formats[index], 1, 1, 0, |
- unsupported_formats[index], GL_UNSIGNED_BYTE, nullptr); |
- EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); |
- |
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, |
- textures_, 0); |
- |
- glClear(GL_COLOR_BUFFER_BIT); |
- |
- glApplyScreenSpaceAntialiasingCHROMIUM(); |
- EXPECT_EQ(static_cast<GLenum>(GL_INVALID_FRAMEBUFFER_OPERATION), |
- glGetError()) |
- << "index:" << index; |
- } |
-} |
- |
TEST_F(GLApplyScreenSpaceAntialiasingCHROMIUMTest, ImmutableTexture) { |
if (!available_) |
return; |