Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2302323002: Reset PIXEL_UNPACK_BUFFER at texture manager initialization time (Closed)
Patch Set: update expectation Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698