| 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 0ad77686904d7d959e50cde34355312caa9e9a84..06ce1cef4294f85a4642eeb8d3bc751c37b3e05e 100644
|
| --- a/gpu/command_buffer/service/feature_info.cc
|
| +++ b/gpu/command_buffer/service/feature_info.cc
|
| @@ -215,6 +215,8 @@
|
| // Default context_type_ to a GLES2 Context.
|
| context_type_ = CONTEXT_TYPE_OPENGLES2;
|
|
|
| + chromium_color_buffer_float_rgba_available_ = false;
|
| + chromium_color_buffer_float_rgb_available_ = false;
|
| ext_color_buffer_float_available_ = false;
|
| oes_texture_float_linear_available_ = false;
|
| oes_texture_half_float_linear_available_ = false;
|
| @@ -298,7 +300,7 @@
|
| }
|
|
|
| void FeatureInfo::EnableCHROMIUMColorBufferFloatRGBA() {
|
| - if (!feature_flags_.chromium_color_buffer_float_rgba)
|
| + if (!chromium_color_buffer_float_rgba_available_)
|
| return;
|
| validators_.texture_internal_format.AddValue(GL_RGBA32F);
|
| validators_.texture_sized_color_renderable_internal_format.AddValue(
|
| @@ -307,7 +309,7 @@
|
| }
|
|
|
| void FeatureInfo::EnableCHROMIUMColorBufferFloatRGB() {
|
| - if (!feature_flags_.chromium_color_buffer_float_rgb)
|
| + if (!chromium_color_buffer_float_rgb_available_)
|
| return;
|
| validators_.texture_internal_format.AddValue(GL_RGB32F);
|
| validators_.texture_sized_color_renderable_internal_format.AddValue(
|
| @@ -649,8 +651,7 @@
|
| // disable BGRA if we have to.
|
| bool has_apple_bgra = extensions.Contains("GL_APPLE_texture_format_BGRA8888");
|
| bool has_ext_bgra = extensions.Contains("GL_EXT_texture_format_BGRA8888");
|
| - bool enable_texture_format_bgra8888 =
|
| - has_ext_bgra || has_apple_bgra || !gl_version_info_->is_es;
|
| + bool has_bgra = has_ext_bgra || has_apple_bgra || !gl_version_info_->is_es;
|
|
|
| bool has_ext_texture_storage = extensions.Contains("GL_EXT_texture_storage");
|
| bool has_arb_texture_storage = extensions.Contains("GL_ARB_texture_storage");
|
| @@ -659,6 +660,7 @@
|
| (has_ext_texture_storage || has_arb_texture_storage ||
|
| gl_version_info_->is_es3 || gl_version_info_->IsAtLeastGL(4, 2));
|
|
|
| + bool enable_texture_format_bgra8888 = has_bgra;
|
| bool enable_texture_storage = has_texture_storage;
|
|
|
| bool texture_storage_incompatible_with_bgra =
|
| @@ -893,12 +895,12 @@
|
| DCHECK(glGetError() == GL_NO_ERROR);
|
|
|
| if (status_rgba == GL_FRAMEBUFFER_COMPLETE) {
|
| - feature_flags_.chromium_color_buffer_float_rgba = true;
|
| + chromium_color_buffer_float_rgba_available_ = true;
|
| if (!disallowed_features_.chromium_color_buffer_float_rgba)
|
| EnableCHROMIUMColorBufferFloatRGBA();
|
| }
|
| if (status_rgb == GL_FRAMEBUFFER_COMPLETE) {
|
| - feature_flags_.chromium_color_buffer_float_rgb = true;
|
| + chromium_color_buffer_float_rgb_available_ = true;
|
| if (!disallowed_features_.chromium_color_buffer_float_rgb)
|
| EnableCHROMIUMColorBufferFloatRGB();
|
| }
|
| @@ -1102,13 +1104,8 @@
|
| feature_flags_.ext_texture_storage = true;
|
| AddExtensionString("GL_EXT_texture_storage");
|
| validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT);
|
| - if (enable_texture_format_bgra8888) {
|
| - validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT);
|
| - validators_.texture_sized_color_renderable_internal_format.AddValue(
|
| - GL_BGRA8_EXT);
|
| - validators_.texture_sized_texture_filterable_internal_format.AddValue(
|
| - GL_BGRA8_EXT);
|
| - }
|
| + if (enable_texture_format_bgra8888)
|
| + validators_.texture_internal_format_storage.AddValue(GL_BGRA8_EXT);
|
| if (enable_texture_float) {
|
| validators_.texture_internal_format_storage.AddValue(GL_RGBA32F_EXT);
|
| validators_.texture_internal_format_storage.AddValue(GL_RGB32F_EXT);
|
| @@ -1480,14 +1477,6 @@
|
| kTotalDrawBufferEnums - max_draw_buffers);
|
| }
|
|
|
| - if (feature_flags_.ext_texture_format_bgra8888) {
|
| - validators_.texture_internal_format.AddValue(GL_BGRA8_EXT);
|
| - validators_.texture_sized_color_renderable_internal_format.AddValue(
|
| - GL_BGRA8_EXT);
|
| - validators_.texture_sized_texture_filterable_internal_format.AddValue(
|
| - GL_BGRA8_EXT);
|
| - }
|
| -
|
| unsafe_es3_apis_enabled_ = true;
|
| }
|
|
|
|
|