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

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

Issue 2460973002: gpu, cmaa: reuse CopyTextureCHROMIUMResourceManager (Closed)
Patch Set: revert unrelated change Created 4 years, 1 month 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698