diff options
author | Romain Guy <romainguy@google.com> | 2011-08-30 14:43:06 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-30 14:43:06 -0700 |
commit | 853921fa6ded5267c71f601beceda0f4cb94df9d (patch) | |
tree | 6568a56bf102031f6dd4b6e84bf94e9844104664 /libs | |
parent | 8d102eb6720deccfb8b5872fde531ef6ca580077 (diff) | |
parent | 799833a8b451a04be201d25ae72213e8562f7774 (diff) | |
download | frameworks_base-853921fa6ded5267c71f601beceda0f4cb94df9d.zip frameworks_base-853921fa6ded5267c71f601beceda0f4cb94df9d.tar.gz frameworks_base-853921fa6ded5267c71f601beceda0f4cb94df9d.tar.bz2 |
Merge "Text would disappear when the font size is 75px. Bug #5230196"
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/FontRenderer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 9acf99b..dd05e61 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -394,14 +394,14 @@ void FontRenderer::flushAllAndInvalidate() { bool FontRenderer::cacheBitmap(const SkGlyph& glyph, uint32_t* retOriginX, uint32_t* retOriginY) { // If the glyph is too tall, don't cache it - if (glyph.fHeight > mCacheLines[mCacheLines.size() - 1]->mMaxHeight) { + if (glyph.fHeight + 2 > mCacheLines[mCacheLines.size() - 1]->mMaxHeight) { if (mCacheHeight < MAX_TEXT_CACHE_HEIGHT) { // Default cache not large enough for large glyphs - resize cache to // max size and try again flushAllAndInvalidate(); initTextTexture(true); } - if (glyph.fHeight > mCacheLines[mCacheLines.size() - 1]->mMaxHeight) { + if (glyph.fHeight + 2 > mCacheLines[mCacheLines.size() - 1]->mMaxHeight) { LOGE("Font size to large to fit in cache. width, height = %i, %i", (int) glyph.fWidth, (int) glyph.fHeight); return false; |