Loading libs/hwui/font/Font.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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); } Loading Loading @@ -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; Loading libs/hwui/font/Font.h +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include <utils/KeyedVector.h> #include <SkScalar.h> #include <SkDeviceProperties.h> #include <SkGlyphCache.h> #include <SkScalerContext.h> #include <SkPaint.h> Loading Loading @@ -146,6 +148,7 @@ private: DefaultKeyedVector<glyph_t, CachedGlyphInfo*> mCachedGlyphs; bool mIdentityTransform; SkDeviceProperties mDeviceProperties; }; inline int strictly_order_type(const Font::FontDescription& lhs, Loading Loading
libs/hwui/font/Font.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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); } Loading Loading @@ -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; Loading
libs/hwui/font/Font.h +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include <utils/KeyedVector.h> #include <SkScalar.h> #include <SkDeviceProperties.h> #include <SkGlyphCache.h> #include <SkScalerContext.h> #include <SkPaint.h> Loading Loading @@ -146,6 +148,7 @@ private: DefaultKeyedVector<glyph_t, CachedGlyphInfo*> mCachedGlyphs; bool mIdentityTransform; SkDeviceProperties mDeviceProperties; }; inline int strictly_order_type(const Font::FontDescription& lhs, Loading