summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author chaochen <c.chen@sta.samsung.com> 2014-08-28 18:45:27 -0700
committer Raj Mamadgi <r.mamadgi@samsung.com> 2014-08-29 20:29:01 +0000
commit1f61b1911e03ef3fc51c3db64798071f3a7477ec (patch)
tree000d7c051470b61894a208210a485b42daa2d0c6
parent428955614836c4a51737e8ff9d4b653c5a80eecd (diff)
Fix GL_INVALID_OPERATION in font renderer when font cache is limited.
b/17332126 This patch is to fix a false logic in FontRenderer when flashAllAndInValidate() happens. The flashAllAndInvalidate will trigger an issueDrawCommand which will set mDrawn to true even though there is no texture drawn. So that the step of unbinding buffer in GL is skipped. And when the second time issueDrawCommand get called, the glVertexAttribPointer will be trigger with GL_ARRAY_BUFFER wrongly bound and then finally lead to a GL_INVALID_OPERATION when glDrawElements() in FontRenderer:issueDrawCommand get called the second time. Change-Id: I1a996354a84db911ace0e7b39ca77cd0dd3d1555 Signed-off-by: Raj Mamadgi <r.mamadgi@samsung.com>
-rw-r--r--libs/hwui/FontRenderer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 8d19ca2b8f99..f44cdc049488 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -182,6 +182,8 @@ void FontRenderer::flushAllAndInvalidate() {
for (uint32_t i = 0; i < mRGBACacheTextures.size(); i++) {
mRGBACacheTextures[i]->init();
}
+
+ mDrawn = false;
}
void FontRenderer::flushLargeCaches(Vector<CacheTexture*>& cacheTextures) {