Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| index 9d202812418477abb98d43c781d33ce2a649b792..309f58aa001d3a5d1cc268eb44d08d6f3ad25335 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -3002,6 +3002,14 @@ bool GLES2DecoderImpl::Initialize( |
| return false; |
| } |
| + // Reset PIXEL_UNPACK_BUFFER to avoid context creation failure. |
| + const char* version_str = |
| + reinterpret_cast<const char*>(glGetString(GL_VERSION)); |
| + std::unique_ptr<gl::GLVersionInfo> version_info; |
| + version_info.reset(new gl::GLVersionInfo(version_str, "", "")); |
| + if (version_info->IsAtLeastGL(3, 2) || version_info->IsAtLeastGLES(3, 0)) |
|
Zhenyao Mo
2016/09/08 18:19:23
This should be feature_info_->IsES3Capable()
qiankun
2016/09/09 02:06:44
IsES3Capable() cannot be used until group_->Initia
|
| + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); |
|
Zhenyao Mo
2016/09/02 17:10:23
Thanks for tracking down the problem, but this is
qiankun
2016/09/02 23:12:01
Do you mean moving the code to virtual context ini
|
| + |
| if (!group_->Initialize(this, attrib_helper.context_type, |
| disallowed_features)) { |
| group_ = NULL; // Must not destroy ContextGroup if it is not initialized. |