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

Unified Diff: gpu/command_buffer/service/feature_info.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: add missing test 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
Index: gpu/command_buffer/service/feature_info.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index e4ae9c5111dee212cb1327ca2c94081b9ab4fe40..d51e279410454f75b1dc0dc5b9bf486cbb1ddf40 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -143,7 +143,8 @@ FeatureInfo::FeatureFlags::FeatureFlags()
angle_texture_usage(false),
ext_texture_storage(false),
chromium_path_rendering(false),
- ext_blend_minmax(false) {
+ ext_blend_minmax(false),
+ blend_equation_advanced(false) {
}
FeatureInfo::Workarounds::Workarounds() :
@@ -852,6 +853,32 @@ void FeatureInfo::InitializeFeatures() {
feature_flags_.chromium_sync_query = true;
}
+ if (extensions.Contains("GL_NV_blend_equation_advanced") ||
+ extensions.Contains("GL_KHR_blend_equation_advanced")) {
+ const GLenum equations[] = {
piman 2014/10/16 20:13:29 nit: indent looks wrong.
+ GL_MULTIPLY_NV,
+ GL_SCREEN_NV,
+ GL_OVERLAY_NV,
+ GL_DARKEN_NV,
+ GL_LIGHTEN_NV,
+ GL_COLORDODGE_NV,
+ GL_COLORBURN_NV,
+ GL_HARDLIGHT_NV,
+ GL_SOFTLIGHT_NV,
+ GL_DIFFERENCE_NV,
+ GL_EXCLUSION_NV,
+ GL_HSL_HUE_NV,
+ GL_HSL_SATURATION_NV,
+ GL_HSL_COLOR_NV,
+ GL_HSL_LUMINOSITY_NV
piman 2014/10/16 20:13:29 If we don't support the whole range of enums, we s
Erik Dahlström (inactive) 2014/10/17 15:33:17 Done.
+ };
+
+ for (const GLenum& equation : equations)
piman 2014/10/16 20:13:29 nit: const & superfluous?
Erik Dahlström (inactive) 2014/10/17 15:33:17 Done.
+ validators_.equation.AddValue(equation);
+ AddExtensionString("GL_NV_blend_equation_advanced");
+ feature_flags_.blend_equation_advanced = true;
+ }
+
if (extensions.Contains("GL_NV_path_rendering")) {
if (extensions.Contains("GL_EXT_direct_state_access") || is_es3) {
AddExtensionString("GL_CHROMIUM_path_rendering");

Powered by Google App Engine
This is Rietveld 408576698