Solve rendering issue with embedded WebViews.
Bug #3094017
The blending mode was not appropriately set after WebView released the
context.
Change-Id: Ib36d48e82c12f6d131dd5a0bcde9106925b8da63
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 5ab5f06..633d778 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -168,6 +168,7 @@
mCaches.currentProgram = NULL;
}
}
+ mCaches.unbindMeshBuffer();
}
void OpenGLRenderer::releaseContext() {
@@ -180,15 +181,11 @@
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- mCaches.bindMeshBuffer();
- if (mCaches.blend) {
- glEnable(GL_BLEND);
- glBlendFunc(mCaches.lastSrcMode, mCaches.lastDstMode);
- glBlendEquation(GL_FUNC_ADD);
- } else {
- glDisable(GL_BLEND);
- }
+ mCaches.blend = true;
+ glEnable(GL_BLEND);
+ glBlendFunc(mCaches.lastSrcMode, mCaches.lastDstMode);
+ glBlendEquation(GL_FUNC_ADD);
}
///////////////////////////////////////////////////////////////////////////////