Loading libs/hwui/font/Font.cpp +5 −5 Original line number Original line Diff line number Diff line Loading @@ -19,7 +19,7 @@ #include <utils/JenkinsHash.h> #include <utils/JenkinsHash.h> #include <utils/Trace.h> #include <utils/Trace.h> #include <SkDeviceProperties.h> #include <SkSurfaceProps.h> #include <SkGlyph.h> #include <SkGlyph.h> #include <SkGlyphCache.h> #include <SkGlyphCache.h> #include <SkUtils.h> #include <SkUtils.h> Loading Loading @@ -281,8 +281,8 @@ CachedGlyphInfo* Font::getCachedGlyph(const SkPaint* paint, glyph_t textUnit, bo if (cachedGlyph) { if (cachedGlyph) { // Is the glyph still in texture cache? // Is the glyph still in texture cache? if (!cachedGlyph->mIsValid) { if (!cachedGlyph->mIsValid) { SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); SkAutoGlyphCacheNoGamma autoCache(*paint, &surfaceProps, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit); updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching); updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching); } } Loading Loading @@ -472,8 +472,8 @@ CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool prec CachedGlyphInfo* newGlyph = new CachedGlyphInfo(); CachedGlyphInfo* newGlyph = new CachedGlyphInfo(); mCachedGlyphs.add(glyph, newGlyph); mCachedGlyphs.add(glyph, newGlyph); SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); SkAutoGlyphCacheNoGamma autoCache(*paint, &surfaceProps, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); newGlyph->mIsValid = false; newGlyph->mIsValid = false; newGlyph->mGlyphIndex = skiaGlyph.fID; newGlyph->mGlyphIndex = skiaGlyph.fID; Loading Loading
libs/hwui/font/Font.cpp +5 −5 Original line number Original line Diff line number Diff line Loading @@ -19,7 +19,7 @@ #include <utils/JenkinsHash.h> #include <utils/JenkinsHash.h> #include <utils/Trace.h> #include <utils/Trace.h> #include <SkDeviceProperties.h> #include <SkSurfaceProps.h> #include <SkGlyph.h> #include <SkGlyph.h> #include <SkGlyphCache.h> #include <SkGlyphCache.h> #include <SkUtils.h> #include <SkUtils.h> Loading Loading @@ -281,8 +281,8 @@ CachedGlyphInfo* Font::getCachedGlyph(const SkPaint* paint, glyph_t textUnit, bo if (cachedGlyph) { if (cachedGlyph) { // Is the glyph still in texture cache? // Is the glyph still in texture cache? if (!cachedGlyph->mIsValid) { if (!cachedGlyph->mIsValid) { SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); SkAutoGlyphCacheNoGamma autoCache(*paint, &surfaceProps, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit); updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching); updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching); } } Loading Loading @@ -472,8 +472,8 @@ CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool prec CachedGlyphInfo* newGlyph = new CachedGlyphInfo(); CachedGlyphInfo* newGlyph = new CachedGlyphInfo(); mCachedGlyphs.add(glyph, newGlyph); mCachedGlyphs.add(glyph, newGlyph); SkDeviceProperties deviceProperties(kUnknown_SkPixelGeometry, 1.0f); SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry); SkAutoGlyphCache autoCache(*paint, &deviceProperties, &mDescription.mLookupTransform); SkAutoGlyphCacheNoGamma autoCache(*paint, &surfaceProps, &mDescription.mLookupTransform); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); newGlyph->mIsValid = false; newGlyph->mIsValid = false; newGlyph->mGlyphIndex = skiaGlyph.fID; newGlyph->mGlyphIndex = skiaGlyph.fID; Loading