From 1de1083e98cde9bdd5e8539dbc54fdea6531906e Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Sun, 3 Oct 2010 14:37:09 -0700 Subject: Initialize font texture cache. Now that text is renderer using bilinear filtering, each character is surrounded by a 1 pixel border. This border needs to be initialized to a transparent value. Change-Id: I26d3195db4bd576ac1f2da4c8f8e4dd18768bf12 --- libs/hwui/FontRenderer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/hwui/FontRenderer.cpp') diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 4e4a277..5485113 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -426,6 +426,8 @@ bool FontRenderer::cacheBitmap(const SkGlyph& glyph, uint32_t* retOriginX, uint3 void FontRenderer::initTextTexture() { mTextTexture = new uint8_t[mCacheWidth * mCacheHeight]; + memset(mTextTexture, 0, mCacheWidth * mCacheHeight * sizeof(uint8_t)); + mUploadTexture = false; glGenTextures(1, &mTextureId); -- cgit v1.1