Commit 3a5fc78c authored by liberato@chromium.org's avatar liberato@chromium.org Committed by Commit Bot

Clean up surface after ContextGroup destruction.

Rather than removing the command decoder's reference to the current
surface before ContextGroup destruction, do so afterwards.  Group
destruction might need the surface.

Bug: 718117
Change-Id: I39edc795a427c89f9a31fbd9d9d5ad58f9de0000
Reviewed-on: https://chromium-review.googlesource.com/574636Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487155}
parent ee07c7f9
......@@ -4914,15 +4914,15 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
gpu_tracer_.reset();
}
// Destroy the surface before the context, some surface destructors make GL
// calls.
surface_ = nullptr;
if (group_.get()) {
group_->Destroy(this, have_context);
group_ = NULL;
}
// Destroy the surface before the context, some surface destructors make GL
// calls.
surface_ = nullptr;
if (context_.get()) {
context_->ReleaseCurrent(NULL);
context_ = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment