Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| index ee25a045d89c983c3e2654c070ab45b51f25e3c6..16904721e07afe0faa62a5e6ff9ad1b5eb73e658 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| @@ -76,7 +76,7 @@ GLES2DecoderPassthroughImpl::GLES2DecoderPassthroughImpl(ContextGroup* group) |
| surface_(), |
| context_(), |
| group_(group), |
| - feature_info_(group->feature_info()) { |
| + feature_info_(new FeatureInfo) { |
| DCHECK(group); |
| } |
| @@ -169,11 +169,22 @@ bool GLES2DecoderPassthroughImpl::Initialize( |
| return false; |
| } |
| + // Each context initializes its own feature info because some extensions may |
| + // be enabled dynamically |
|
Zhenyao Mo
2017/02/06 22:31:38
I am wondering if this is necessary - WebGL has no
Geoff Lang
2017/02/07 19:01:15
I wanted to be sure that the feature info doesn't
|
| + DisallowedFeatures adjusted_disallowed_features = |
| + AdjustDisallowedFeatures(attrib_helper.context_type, disallowed_features); |
| + if (!feature_info_->Initialize(attrib_helper.context_type, |
| + adjusted_disallowed_features)) { |
| + Destroy(true); |
| + return false; |
| + } |
| + |
| // Check for required extensions |
| if (!feature_info_->feature_flags().angle_robust_client_memory || |
| - !feature_info_->feature_flags().chromium_bind_generates_resource) { |
| - // TODO(geofflang): Verify that ANGLE_webgl_compatibility is enabled if this |
| - // is a WebGL context (depends on crbug.com/671217). |
| + !feature_info_->feature_flags().chromium_bind_generates_resource || |
| + feature_info_->feature_flags().angle_webgl_compatibility != |
| + IsWebGLContextType(attrib_helper.context_type) || |
| + !feature_info_->feature_flags().angle_request_extension) { |
| Destroy(true); |
| return false; |
| } |