Loading libs/hwui/font/Font.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/JenkinsHash.h> #include <utils/Trace.h> #include <SkDeviceProperties.h> #include <SkGlyph.h> #include <SkGlyphCache.h> #include <SkUtils.h> Loading @@ -41,9 +42,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// Font::Font(FontRenderer* state, const Font::FontDescription& desc) : mState(state), mDescription(desc) { mDeviceProperties = SkDeviceProperties::Make(SkDeviceProperties::Geometry::MakeDefault(), 1.0f); } mState(state), mDescription(desc) { } Font::FontDescription::FontDescription(const SkPaint* paint, const SkMatrix& rasterMatrix) : mLookupTransform(rasterMatrix) { Loading Loading @@ -285,7 +284,8 @@ 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, &mDeviceProperties, &mDescription.mLookupTransform); SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit); updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching); } Loading Loading @@ -477,7 +477,8 @@ CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool prec CachedGlyphInfo* newGlyph = new CachedGlyphInfo(); mCachedGlyphs.add(glyph, newGlyph); SkAutoGlyphCache autoCache(*paint, &mDeviceProperties, &mDescription.mLookupTransform); SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); newGlyph->mIsValid = false; newGlyph->mGlyphIndex = skiaGlyph.fID; Loading libs/hwui/font/Font.h +0 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ #include <utils/KeyedVector.h> #include <SkScalar.h> #include <SkDeviceProperties.h> #include <SkGlyphCache.h> #include <SkScalerContext.h> #include <SkPaint.h> Loading Loading @@ -150,7 +149,6 @@ 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 +6 −5 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/JenkinsHash.h> #include <utils/Trace.h> #include <SkDeviceProperties.h> #include <SkGlyph.h> #include <SkGlyphCache.h> #include <SkUtils.h> Loading @@ -41,9 +42,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// Font::Font(FontRenderer* state, const Font::FontDescription& desc) : mState(state), mDescription(desc) { mDeviceProperties = SkDeviceProperties::Make(SkDeviceProperties::Geometry::MakeDefault(), 1.0f); } mState(state), mDescription(desc) { } Font::FontDescription::FontDescription(const SkPaint* paint, const SkMatrix& rasterMatrix) : mLookupTransform(rasterMatrix) { Loading Loading @@ -285,7 +284,8 @@ 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, &mDeviceProperties, &mDescription.mLookupTransform); SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit); updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching); } Loading Loading @@ -477,7 +477,8 @@ CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool prec CachedGlyphInfo* newGlyph = new CachedGlyphInfo(); mCachedGlyphs.add(glyph, newGlyph); SkAutoGlyphCache autoCache(*paint, &mDeviceProperties, &mDescription.mLookupTransform); SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); newGlyph->mIsValid = false; newGlyph->mGlyphIndex = skiaGlyph.fID; Loading
libs/hwui/font/Font.h +0 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ #include <utils/KeyedVector.h> #include <SkScalar.h> #include <SkDeviceProperties.h> #include <SkGlyphCache.h> #include <SkScalerContext.h> #include <SkPaint.h> Loading Loading @@ -150,7 +149,6 @@ private: DefaultKeyedVector<glyph_t, CachedGlyphInfo*> mCachedGlyphs; bool mIdentityTransform; SkDeviceProperties mDeviceProperties; }; inline int strictly_order_type(const Font::FontDescription& lhs, Loading