| 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 d30abaa72f216f6d547b875e8f998619eaad3d3a..d47eea5c26a98ad26991df6ec60ea046565dcb94 100644
|
| --- a/gpu/command_buffer/service/feature_info.cc
|
| +++ b/gpu/command_buffer/service/feature_info.cc
|
| @@ -199,8 +199,7 @@ void FeatureInfo::InitializeBasicState(const base::CommandLine* command_line) {
|
| feature_flags_.is_swiftshader =
|
| (command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader");
|
|
|
| - enable_unsafe_es3_apis_switch_ =
|
| - command_line->HasSwitch(switches::kEnableUnsafeES3APIs);
|
| + enable_es3_apis_switch_ = true;
|
|
|
| // The shader translator is needed to translate from WebGL-conformant GLES SL
|
| // to normal GLES SL, enforce WebGL conformance, translate from GLES SL 1.0 to
|
| @@ -210,10 +209,10 @@ void FeatureInfo::InitializeBasicState(const base::CommandLine* command_line) {
|
| disable_shader_translator_ =
|
| command_line->HasSwitch(switches::kDisableGLSLTranslator);
|
|
|
| - unsafe_es3_apis_enabled_ = false;
|
| + es3_apis_enabled_ = false;
|
|
|
| // Default context_type_ to a GLES2 Context.
|
| - context_type_ = CONTEXT_TYPE_OPENGLES2;
|
| + context_type_ = CONTEXT_TYPE_OPENGLES2; // ??
|
|
|
| ext_color_buffer_float_available_ = false;
|
| oes_texture_float_linear_available_ = false;
|
| @@ -1410,7 +1409,10 @@ void FeatureInfo::InitializeFeatures() {
|
| }
|
|
|
| bool FeatureInfo::IsES3Capable() const {
|
| - if (!enable_unsafe_es3_apis_switch_)
|
| + if (!enable_es3_apis_switch_)
|
| + return false;
|
| + if (context_type_ != CONTEXT_TYPE_WEBGL2 &&
|
| + context_type_ != CONTEXT_TYPE_OPENGLES3)
|
| return false;
|
| if (workarounds_.disable_texture_storage)
|
| return false;
|
| @@ -1491,7 +1493,7 @@ void FeatureInfo::EnableES3Validators() {
|
| GL_BGRA8_EXT);
|
| }
|
|
|
| - unsafe_es3_apis_enabled_ = true;
|
| + es3_apis_enabled_ = true;
|
| }
|
|
|
| bool FeatureInfo::IsWebGLContext() const {
|
|
|