Commit 61561f0c authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Don't use GLStateRestorer with the passthrough command decoder.

The passthrough command decoder does not implement the state restoration
functions because it does not track state. When a GLStateRestorer
exists, it is used for the scoped binders in ui/gl/scoped_binders.h and
leads to incorrect state being applied.

BUG=88258

Change-Id: I18937597fc02562dfaf01d67a9d4a1b8b84290a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670949Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672107}
parent 50566bd6
...@@ -329,7 +329,11 @@ gpu::ContextResult GLES2CommandBufferStub::Initialize( ...@@ -329,7 +329,11 @@ gpu::ContextResult GLES2CommandBufferStub::Initialize(
return gpu::ContextResult::kTransientFailure; return gpu::ContextResult::kTransientFailure;
} }
if (!context->GetGLStateRestorer()) { // The GLStateRestorer is not used with the passthrough command decoder
// because not all state is tracked in the decoder. Virtualized contexts are
// also not used.
if (!context->GetGLStateRestorer() &&
!context_group_->use_passthrough_cmd_decoder()) {
context->SetGLStateRestorer( context->SetGLStateRestorer(
new GLStateRestorerImpl(gles2_decoder_->AsWeakPtr())); new GLStateRestorerImpl(gles2_decoder_->AsWeakPtr()));
} }
......
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