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

Unified Diff: gpu/command_buffer/service/context_group.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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gl_context_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index a78799d7e3a458f10b1286e75eb0ac114fec5f05..291763b0f40c595160674c398c9e30bea742a158 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -553,9 +553,11 @@ void ContextGroup::Destroy(GLES2Decoder* decoder, bool have_context) {
memory_tracker_ = NULL;
- passthrough_resources_->Destroy(have_context);
- passthrough_resources_.reset();
- ReportProgress();
+ if (passthrough_resources_) {
+ passthrough_resources_->Destroy(have_context);
+ passthrough_resources_.reset();
+ ReportProgress();
+ }
}
uint32_t ContextGroup::GetMemRepresented() const {
« no previous file with comments | « no previous file | gpu/command_buffer/service/gl_context_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698