Commit 86d0abb7 authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Pass the correct have_context to GLES2Decoder::Destroy in the GPU fuzzer

ResetDecoder would always pass a true have_context to GLES2Decoder::Destroy
causing some assertions in the destuction of GL objects when the context
had previously been lost.

BUG=877524

Change-Id: I8b455ba0aa9515764d5caca63668401b09cb124e
Reviewed-on: https://chromium-review.googlesource.com/c/1344212Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609763}
parent bb299c1b
......@@ -403,9 +403,11 @@ class CommandBufferSetup {
if (translator)
translator->AddRef();
#endif
decoder_->Destroy(true);
bool context_lost =
decoder_->WasContextLost() || !decoder_->CheckResetStatus();
decoder_->Destroy(!context_lost);
decoder_.reset();
if (recreate_context_) {
if (recreate_context_ || context_lost) {
context_->ReleaseCurrent(nullptr);
context_ = nullptr;
}
......
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