Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc |
| index 74c7a4a6d7522416bd5f4cc9e7af8ebacd7cec3e..2b8efd839c3bf9bca4bb0ce5fc2f80db655ea71c 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc |
| @@ -2596,14 +2596,26 @@ error::Error GLES2DecoderPassthroughImpl::DoResizeCHROMIUM(GLuint width, |
| error::Error GLES2DecoderPassthroughImpl::DoGetRequestableExtensionsCHROMIUM( |
| const char** extensions) { |
| - *extensions = ""; |
| - NOTIMPLEMENTED(); |
| + *extensions = reinterpret_cast<const char*>( |
| + glGetString(GL_REQUESTABLE_EXTENSIONS_ANGLE)); |
| return error::kNoError; |
| } |
| error::Error GLES2DecoderPassthroughImpl::DoRequestExtensionCHROMIUM( |
| const char* extension) { |
| - NOTIMPLEMENTED(); |
| + glRequestExtensionANGLE(extension); |
| + |
| + // Make sure there are no pending GL errors before re-initializing feature |
| + // info |
| + FlushErrors(); |
| + |
| + // Make sure newly enabled extensions are exposed and usable. |
| + context_->ReinitializeDynamicBindings(); |
|
Zhenyao Mo
2017/03/09 18:03:18
This is potentially a perf concern for WebGL start
Geoff Lang
2017/03/16 14:59:46
Done, put a comment next to GLContext::Reinitializ
|
| + if (!feature_info_->Initialize(feature_info_->context_type(), |
| + feature_info_->disallowed_features())) { |
| + return error::kLostContext; |
| + } |
| + |
| return error::kNoError; |
| } |