Commit 1750c838 authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

aw: Null check glBindRenderbufferEXT binding

Some devices are apparently crashing due to a null binding here.
Plumbing the correct conditions is somewhat difficult and brittle. So
just add a null check instead.

Bug: 950472
Change-Id: I26b9d1c2ec0db7abe23a32f2e8d7078a59e5767a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1564570Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649854}
parent 93131b7d
...@@ -199,8 +199,11 @@ ScopedAppGLStateRestoreImpl::ScopedAppGLStateRestoreImpl( ...@@ -199,8 +199,11 @@ ScopedAppGLStateRestoreImpl::ScopedAppGLStateRestoreImpl(
SaveHWUIState(); SaveHWUIState();
} }
if (mode_ == ScopedAppGLStateRestore::MODE_RESOURCE_MANAGEMENT) { if (mode_ == ScopedAppGLStateRestore::MODE_RESOURCE_MANAGEMENT &&
::gl::g_current_gl_driver->fn.glBindRenderbufferEXTFn != nullptr) {
// Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570.
// Null check the binding since checking the proper condition is hard. See
// crbug.com/950472.
glBindRenderbufferEXT(GL_RENDERBUFFER, 0); glBindRenderbufferEXT(GL_RENDERBUFFER, 0);
} }
......
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