Commit 40ce0aba authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

SharedImageStub: pass needs_gl = false to MakeCurrent.

For non-GL backends, shared image backings doesn't need GL API,
so call MakeCurrent with needs_gl = false. For GL backend,
MakeCurrent() will ignore needs_gl, and always make the context
current.

Bug: None
Change-Id: I95ab79f0bb332122d7243f2a7361c6ff07e85407
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2230327
Auto-Submit: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#775165}
parent 3c608a11
...@@ -401,8 +401,8 @@ bool SharedImageStub::MakeContextCurrent() { ...@@ -401,8 +401,8 @@ bool SharedImageStub::MakeContextCurrent() {
// improve performance. https://crbug.com/457431 // improve performance. https://crbug.com/457431
auto* context = context_state_->real_context(); auto* context = context_state_->real_context();
if (context->IsCurrent(nullptr)) if (context->IsCurrent(nullptr))
return !context_state_->CheckResetStatus(/*needs_gl=*/true); return !context_state_->CheckResetStatus(/*needs_gl=*/false);
return context_state_->MakeCurrent(/*surface=*/nullptr, /*needs_gl=*/true); return context_state_->MakeCurrent(/*surface=*/nullptr, /*needs_gl=*/false);
} }
ContextResult SharedImageStub::MakeContextCurrentAndCreateFactory() { ContextResult SharedImageStub::MakeContextCurrentAndCreateFactory() {
......
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