Commit e001bb16 authored by Saman Sami's avatar Saman Sami Committed by Commit Bot

Fix glDeleteTextures called without context

When we don't have a current context, g_current_gl_context is not null.
Instead, it's an instance of NoContextGLApi. In ExternalVkImageBacking
::Destroy, don't check that g_current_gl_context is null. Always call
MakeCurrent.

Bug: 939442
Change-Id: Icc4cc15daec78f32697d56cc102718cf5b0a229b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1754708Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687257}
parent d6a3ffd6
......@@ -457,8 +457,7 @@ void ExternalVkImageBacking::Destroy() {
if (texture_) {
// Ensure that a context is current before removing the ref and calling
// glDeleteTextures.
if (!gl::g_current_gl_context)
context_state()->MakeCurrent(nullptr, true /* need_gl */);
context_state()->MakeCurrent(nullptr, true /* need_gl */);
texture_->RemoveLightweightRef(have_context());
}
}
......
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