diff options
author | Victoria Lease <violets@google.com> | 2014-04-22 22:37:36 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-22 22:37:36 +0000 |
commit | b78263d37690a6a5cb12dd31d82ad2e140b3dfc7 (patch) | |
tree | 68ff2d16b607973a452e362f933db60fde4b7dda /libs/hwui/font/Font.cpp | |
parent | 0d751e31cdbbcc25f191fa901533b2e1f1d20986 (diff) | |
parent | b66270eac288de53207e55d10879b070a0ec8b6b (diff) | |
download | frameworks_base-b78263d37690a6a5cb12dd31d82ad2e140b3dfc7.zip frameworks_base-b78263d37690a6a5cb12dd31d82ad2e140b3dfc7.tar.gz frameworks_base-b78263d37690a6a5cb12dd31d82ad2e140b3dfc7.tar.bz2 |
Merge "ask skia to use flat gamma when rendering fonts from hwui"
Diffstat (limited to 'libs/hwui/font/Font.cpp')
-rw-r--r-- | libs/hwui/font/Font.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/font/Font.cpp b/libs/hwui/font/Font.cpp index 5187f8f..d22cb8a 100644 --- a/libs/hwui/font/Font.cpp +++ b/libs/hwui/font/Font.cpp @@ -42,6 +42,7 @@ namespace uirenderer { Font::Font(FontRenderer* state, const Font::FontDescription& desc) : mState(state), mDescription(desc) { + mDeviceProperties = SkDeviceProperties::Make(SkDeviceProperties::Geometry::MakeDefault(), 1.0f); } Font::FontDescription::FontDescription(const SkPaint* paint, const mat4& matrix) { @@ -272,7 +273,7 @@ CachedGlyphInfo* Font::getCachedGlyph(const SkPaint* paint, glyph_t textUnit, bo if (cachedGlyph) { // Is the glyph still in texture cache? if (!cachedGlyph->mIsValid) { - SkAutoGlyphCache autoCache(*paint, NULL, &mDescription.mLookupTransform); + SkAutoGlyphCache autoCache(*paint, &mDeviceProperties, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit); updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching); } @@ -464,7 +465,7 @@ CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool prec CachedGlyphInfo* newGlyph = new CachedGlyphInfo(); mCachedGlyphs.add(glyph, newGlyph); - SkAutoGlyphCache autoCache(*paint, NULL, &mDescription.mLookupTransform); + SkAutoGlyphCache autoCache(*paint, &mDeviceProperties, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); newGlyph->mIsValid = false; newGlyph->mGlyphIndex = skiaGlyph.fID; |