| 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 f52374aa71631f9e352b8bde72937a022a18bd94..a2b94b7eab74f19b685a52f7527f32269fa6dc33 100644
|
| --- a/gpu/command_buffer/service/feature_info.cc
|
| +++ b/gpu/command_buffer/service/feature_info.cc
|
| @@ -591,11 +591,13 @@ 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.
|
| + bool have_srgb = false;
|
| if ((((gl_version_info_->is_es3 ||
|
| extensions.Contains("GL_OES_rgb8_rgba8")) &&
|
| extensions.Contains("GL_EXT_sRGB")) ||
|
| feature_flags_.desktop_srgb_support) &&
|
| IsWebGL1OrES2Context()) {
|
| + have_srgb = true;
|
| AddExtensionString("GL_EXT_sRGB");
|
| validators_.texture_internal_format.AddValue(GL_SRGB_EXT);
|
| validators_.texture_internal_format.AddValue(GL_SRGB_ALPHA_EXT);
|
| @@ -608,6 +610,28 @@ void FeatureInfo::InitializeFeatures() {
|
| validators_.texture_unsized_internal_format.AddValue(GL_SRGB_ALPHA_EXT);
|
| }
|
|
|
| + if ((have_s3tc || (enable_dxt1 && enable_dxt3 && enable_dxt5)) && have_srgb) {
|
| + AddExtensionString("GL_EXT_texture_compression_s3tc_srgb");
|
| +
|
| + validators_.compressed_texture_format.AddValue(
|
| + GL_COMPRESSED_SRGB_S3TC_DXT1_EXT);
|
| + validators_.compressed_texture_format.AddValue(
|
| + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT);
|
| + validators_.compressed_texture_format.AddValue(
|
| + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT);
|
| + validators_.compressed_texture_format.AddValue(
|
| + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT);
|
| +
|
| + validators_.texture_internal_format_storage.AddValue(
|
| + GL_COMPRESSED_SRGB_S3TC_DXT1_EXT);
|
| + validators_.texture_internal_format_storage.AddValue(
|
| + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT);
|
| + validators_.texture_internal_format_storage.AddValue(
|
| + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT);
|
| + validators_.texture_internal_format_storage.AddValue(
|
| + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT);
|
| + }
|
| +
|
| // Note: Only APPLE_texture_format_BGRA8888 extension allows BGRA8_EXT in
|
| // ES3's glTexStorage2D, whereas EXT_texture_format_BGRA8888 doesn't provide
|
| // that compatibility. So if EXT_texture_format_BGRA8888 (but not
|
|
|