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

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

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 11 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.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
index eea4e8cb1c7f91d04d225de5b66a120edf2738b7..ee25a045d89c983c3e2654c070ab45b51f25e3c6 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -223,10 +223,19 @@ void GLES2DecoderPassthroughImpl::Destroy(bool have_context) {
&vertex_array_id_map_, have_context,
[](GLuint vertex_array) { glDeleteVertexArraysOES(1, &vertex_array); });
+ // Destroy the surface before the context, some surface destructors make GL
+ // calls.
+ surface_ = nullptr;
+
if (group_) {
group_->Destroy(this, have_context);
group_ = nullptr;
}
+
+ if (context_.get()) {
+ context_->ReleaseCurrent(nullptr);
+ context_ = nullptr;
+ }
}
void GLES2DecoderPassthroughImpl::SetSurface(
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698