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

Unified Diff: gpu/command_buffer/service/feature_info_unittest.cc

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/feature_info_unittest.cc
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
index 8455be671cbebcf776763ec06bf900c79c509432..177ef1038b73cc99693e11f935f65ab11b12dc58 100644
--- a/gpu/command_buffer/service/feature_info_unittest.cc
+++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -576,7 +576,7 @@ TEST_F(FeatureInfoTest, InitializeEXT_texture_storage_half_float) {
GL_LUMINANCE_ALPHA16F_EXT));
}
-// Check how to handle ES, texture_storage and BGRA combination; 8 tests.
+// Check how to handle ES, texture_storage and BGRA combination; 10 tests.
// 1- ES2 + GL_EXT_texture_storage -> GL_EXT_texture_storage (and no
// GL_EXT_texture_format_BGRA8888 - we don't claim to handle GL_BGRA8 in
@@ -658,6 +658,24 @@ TEST_F(FeatureInfoTest, InitializeGLES3_texture_storage) {
Not(HasSubstr("GL_EXT_texture_format_BGRA8888")));
}
+// 9- ANGLE will add the GL_CHROMIUM_renderbuffer_format_BGRA8888 extension and
+// the GL_BGRA8_EXT render buffer format.
+TEST_F(FeatureInfoTest, InitializeWithANGLE_BGRA8) {
+ SetupInitExpectationsWithGLVersion("", kGLRendererStringANGLE, "");
+ EXPECT_TRUE(info_->gl_version_info().is_angle);
+ EXPECT_THAT(info_->extensions(),
+ HasSubstr("GL_CHROMIUM_renderbuffer_format_BGRA8888"));
+ EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_BGRA8_EXT));
+}
+
+// 10- vanilla opengl es means no GL_CHROMIUM_renderbuffer_format_BGRA8888
+TEST_F(FeatureInfoTest,
+ InitializeGLES2_no_CHROMIUM_renderbuffer_format_BGRA8888) {
+ SetupInitExpectationsWithGLVersion("", "", "OpenGL ES 2.0");
+ EXPECT_THAT(info_->extensions(),
+ Not(HasSubstr("GL_CHROMIUM_renderbuffer_format_BGRA8888")));
+}
+
TEST_F(FeatureInfoTest, InitializeARB_texture_float) {
SetupInitExpectations("GL_ARB_texture_float");
EXPECT_TRUE(info_->feature_flags().chromium_color_buffer_float_rgba);
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gl_context_virtual.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698