diff options
author | bajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 04:16:36 +0000 |
---|---|---|
committer | bajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 04:16:36 +0000 |
commit | a08a328e4b03625eafa1fc67a92a9ff9a3f24f3a (patch) | |
tree | 9b58d4b0d6ae2e6aced14cf1ba02659eb36ffa88 | |
parent | e2ce39ba8c17d53dd587d0f40cadfe361b7ce6ca (diff) | |
download | chromium_src-a08a328e4b03625eafa1fc67a92a9ff9a3f24f3a.zip chromium_src-a08a328e4b03625eafa1fc67a92a9ff9a3f24f3a.tar.gz chromium_src-a08a328e4b03625eafa1fc67a92a9ff9a3f24f3a.tar.bz2 |
Added Chrome-side support for EXT_blend_minmax WebGL extension
BUG=344451
Review URL: https://codereview.chromium.org/286553002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270012 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | gpu/command_buffer/service/feature_info.cc | 7 | ||||
-rw-r--r-- | gpu/command_buffer/service/feature_info_unittest.cc | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index 81df6b6..9fa91b7 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -777,6 +777,13 @@ void FeatureInfo::InitializeFeatures() { } } + if (extensions.Contains("GL_EXT_blend_minmax") || + gfx::HasDesktopGLFeatures()) { + AddExtensionString("GL_EXT_blend_minmax"); + validators_.equation.AddValue(GL_MIN_EXT); + validators_.equation.AddValue(GL_MAX_EXT); + } + if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) { AddExtensionString("GL_EXT_frag_depth"); feature_flags_.ext_frag_depth = true; diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index 973f2a0..81ecfe2 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc @@ -316,6 +316,8 @@ TEST_F(FeatureInfoTest, InitializeNoExtensions) { GL_DEPTH_COMPONENT32_OES)); EXPECT_FALSE(info_->validators()->texture_internal_format_storage.IsValid( GL_DEPTH24_STENCIL8_OES)); + EXPECT_FALSE(info_->validators()->equation.IsValid(GL_MIN_EXT)); + EXPECT_FALSE(info_->validators()->equation.IsValid(GL_MAX_EXT)); } TEST_F(FeatureInfoTest, InitializeWithANGLE) { @@ -952,6 +954,13 @@ TEST_F(FeatureInfoTest, InitializeVAOsWithClientSideArrays) { EXPECT_FALSE(info_->feature_flags().native_vertex_array_object); } +TEST_F(FeatureInfoTest, InitializeEXT_blend_minmax) { + SetupInitExpectations("GL_EXT_blend_minmax"); + EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_blend_minmax")); + EXPECT_TRUE(info_->validators()->equation.IsValid(GL_MIN_EXT)); + EXPECT_TRUE(info_->validators()->equation.IsValid(GL_MAX_EXT)); +} + TEST_F(FeatureInfoTest, InitializeEXT_frag_depth) { SetupInitExpectations("GL_EXT_frag_depth"); EXPECT_TRUE(info_->feature_flags().ext_frag_depth); |