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

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

Issue 643373003: Add support for all blendmodes if we have GL_KHR_blend_equation_advanced. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix feature_info_unittest Created 6 years, 2 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/gles2_cmd_decoder.cc » ('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 004eeeee0aed336d3f1e6041a5afce63ca98f0b5..a97188fbb1717cfd4fadbb918fe699bfd0ad61a6 100644
--- a/gpu/command_buffer/service/feature_info_unittest.cc
+++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -1347,5 +1347,39 @@ TEST_F(FeatureInfoTest, InitializeNoCHROMIUM_path_rendering2) {
Not(HasSubstr("GL_CHROMIUM_path_rendering")));
}
+TEST_F(FeatureInfoTest, InitializeNoKHR_blend_equation_advanced) {
+ SetupInitExpectationsWithGLVersion("", "", "4.3");
+ EXPECT_FALSE(info_->feature_flags().blend_equation_advanced);
+ EXPECT_THAT(info_->extensions(),
+ Not(HasSubstr("GL_KHR_blend_equation_advanced")));
+}
+
+TEST_F(FeatureInfoTest, InitializeKHR_blend_equations_advanced) {
+ SetupInitExpectations("GL_KHR_blend_equation_advanced");
+ EXPECT_THAT(info_->extensions(), HasSubstr("GL_KHR_blend_equation_advanced"));
+ EXPECT_TRUE(info_->feature_flags().blend_equation_advanced);
+}
+
+TEST_F(FeatureInfoTest, InitializeNV_blend_equations_advanced) {
+ SetupInitExpectations("GL_NV_blend_equation_advanced");
+ EXPECT_THAT(info_->extensions(), HasSubstr("GL_KHR_blend_equation_advanced"));
+ EXPECT_TRUE(info_->feature_flags().blend_equation_advanced);
+}
+
+TEST_F(FeatureInfoTest, InitializeNoKHR_blend_equation_advanced_coherent) {
+ SetupInitExpectationsWithGLVersion("", "", "4.3");
+ EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent);
+ EXPECT_THAT(info_->extensions(),
+ Not(HasSubstr("GL_KHR_blend_equation_advanced_coherent")));
+}
+
+TEST_F(FeatureInfoTest, InitializeKHR_blend_equations_advanced_coherent) {
+ SetupInitExpectations("GL_KHR_blend_equation_advanced_coherent");
+ EXPECT_THAT(info_->extensions(),
+ HasSubstr("GL_KHR_blend_equation_advanced_coherent"));
+ EXPECT_TRUE(info_->feature_flags().blend_equation_advanced);
+ EXPECT_TRUE(info_->feature_flags().blend_equation_advanced_coherent);
+}
+
} // namespace gles2
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698