summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2010-10-03 14:37:09 -0700
committerRomain Guy <romainguy@android.com>2010-10-03 14:39:09 -0700
commit1de1083e98cde9bdd5e8539dbc54fdea6531906e (patch)
tree7d12905ca53dd896d23a08803a6756f02645b7fc /libs/hwui
parent7afbb30d636351334d101fd0caef391fa409230d (diff)
downloadframeworks_base-1de1083e98cde9bdd5e8539dbc54fdea6531906e.zip
frameworks_base-1de1083e98cde9bdd5e8539dbc54fdea6531906e.tar.gz
frameworks_base-1de1083e98cde9bdd5e8539dbc54fdea6531906e.tar.bz2
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
Diffstat (limited to 'libs/hwui')
-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 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);