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

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

Issue 1881883002: SRGB_EXT is a valid format of texture in WebGL1.0 and ES2.0 contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address ken's comment: shrink the context range Created 4 years, 8 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 | « no previous file | gpu/command_buffer/service/texture_manager.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.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 24fe49f94668c10fa8adb6e0564bafde487a7ae4..b2b468ca681051ea01ed8ed42c34541d5ccad314 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -542,9 +542,12 @@ void FeatureInfo::InitializeFeatures() {
// sized formats GL_SRGB8 and GL_SRGB8_ALPHA8. Also, SRGB_EXT isn't a valid
// <format> in this case. So, even with GLES3 explicitly check for
// GL_EXT_sRGB.
- if (((gl_version_info_->is_es3 || extensions.Contains("GL_OES_rgb8_rgba8")) &&
- extensions.Contains("GL_EXT_sRGB")) ||
- gfx::HasDesktopGLFeatures()) {
+ if ((((gl_version_info_->is_es3 ||
+ extensions.Contains("GL_OES_rgb8_rgba8")) &&
+ extensions.Contains("GL_EXT_sRGB")) ||
+ gfx::HasDesktopGLFeatures()) &&
+ (context_type_ == CONTEXT_TYPE_WEBGL1 ||
+ context_type_ == CONTEXT_TYPE_OPENGLES2)) {
AddExtensionString("GL_EXT_sRGB");
validators_.texture_internal_format.AddValue(GL_SRGB_EXT);
validators_.texture_internal_format.AddValue(GL_SRGB_ALPHA_EXT);
@@ -553,6 +556,7 @@ void FeatureInfo::InitializeFeatures() {
validators_.render_buffer_format.AddValue(GL_SRGB8_ALPHA8_EXT);
validators_.frame_buffer_parameter.AddValue(
GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT);
+ validators_.texture_unsized_internal_format.AddValue(GL_SRGB_EXT);
validators_.texture_unsized_internal_format.AddValue(GL_SRGB_ALPHA_EXT);
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698