summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2013-08-12 14:38:44 -0700
committerVictoria Lease <violets@google.com>2013-08-12 15:12:49 -0700
commit723b2feb929b96b1dde40a865c49ea18bc42f055 (patch)
tree31415cd1bef736d7da007944999064ffad63b822 /libs/hwui
parent9a68f82f3730432399618bf2e4f73208f84dc87f (diff)
downloadframeworks_base-723b2feb929b96b1dde40a865c49ea18bc42f055.zip
frameworks_base-723b2feb929b96b1dde40a865c49ea18bc42f055.tar.gz
frameworks_base-723b2feb929b96b1dde40a865c49ea18bc42f055.tar.bz2
fix kBW_Format glyphs
Oops! kBW_Format was omitted from a couple of switch statements, resulting in glyphs in that format being invisible. Bug: 10206452 Change-Id: Ib2aa52250aeeecc0de1b1b78e3d0f568f368c73e
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/FontRenderer.cpp1
-rw-r--r--libs/hwui/font/CacheTexture.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 1700473..cb6bb2e 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -234,6 +234,7 @@ void FontRenderer::cacheBitmap(const SkGlyph& glyph, CachedGlyphInfo* cachedGlyp
Vector<CacheTexture*>* cacheTextures = NULL;
switch (format) {
case SkMask::kA8_Format:
+ case SkMask::kBW_Format:
cacheTextures = &mACacheTextures;
break;
case SkMask::kARGB32_Format:
diff --git a/libs/hwui/font/CacheTexture.cpp b/libs/hwui/font/CacheTexture.cpp
index 55503ce..cbed3e4 100644
--- a/libs/hwui/font/CacheTexture.cpp
+++ b/libs/hwui/font/CacheTexture.cpp
@@ -233,9 +233,11 @@ void CacheTexture::setDirty(bool dirty) {
bool CacheTexture::fitBitmap(const SkGlyph& glyph, uint32_t* retOriginX, uint32_t* retOriginY) {
switch (glyph.fMaskFormat) {
case SkMask::kA8_Format:
+ case SkMask::kBW_Format:
if (mFormat != GL_ALPHA) {
#if DEBUG_FONT_RENDERER
- ALOGD("fitBitmap: kA8_Format glyph cannot fit into texture format %x", mFormat);
+ ALOGD("fitBitmap: texture format %x is inappropriate for monochromatic glyphs",
+ mFormat);
#endif
return false;
}
@@ -243,7 +245,7 @@ bool CacheTexture::fitBitmap(const SkGlyph& glyph, uint32_t* retOriginX, uint32_
case SkMask::kARGB32_Format:
if (mFormat != GL_RGBA) {
#if DEBUG_FONT_RENDERER
- ALOGD("fitBitmap: kARGB32_Format glyph cannot fit into texture format %x", mFormat);
+ ALOGD("fitBitmap: texture format %x is inappropriate for colour glyphs", mFormat);
#endif
return false;
}