Chromium Code Reviews| Index: gpu/command_buffer/service/context_group.cc |
| diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc |
| index 539758427695de011d2356b3860b9549633ffc1d..0e0c27c5efc433637b4f10f1c87038a4d6b1a531 100644 |
| --- a/gpu/command_buffer/service/context_group.cc |
| +++ b/gpu/command_buffer/service/context_group.cc |
| @@ -118,6 +118,16 @@ ContextGroup::ContextGroup( |
| bool ContextGroup::Initialize(GLES2Decoder* decoder, |
| ContextType context_type, |
| const DisallowedFeatures& disallowed_features) { |
| + if (!gpu_preferences_.enable_unsafe_es3_apis) { |
| + if (context_type == CONTEXT_TYPE_OPENGLES3) { |
| + context_type = CONTEXT_TYPE_OPENGLES2; |
|
Zhenyao Mo
2016/11/02 22:49:57
You should print out a DLOG as the WEBGL2 case. No
|
| + return false; |
| + } else if (context_type == CONTEXT_TYPE_WEBGL2) { |
| + DLOG(ERROR) << "ContextGroup::Initialize failed because WebGL 2 is not " |
| + << "available."; |
| + return false; |
| + } |
| + } |
| if (HaveContexts()) { |
| if (context_type != feature_info_->context_type()) { |
| DLOG(ERROR) << "ContextGroup::Initialize failed because the type of " |