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

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

Issue 2670213005: Hook ANGLE_request_extension up to the passthrough cmd decoder. (Closed)
Patch Set: Address zmo@'s comments Created 3 years, 9 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_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 def9b0f8a28f5b3d94a59b0ddb16c4ed95ffbe95..ae441dbd0d3f2300531479625c60bd83567f1b9d 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();
+ if (!feature_info_->Initialize(feature_info_->context_type(),
+ feature_info_->disallowed_features())) {
+ return error::kLostContext;
+ }
+
return error::kNoError;
}

Powered by Google App Engine
This is Rietveld 408576698