Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e92a2dbf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update legacy font renderer to use the updated method names from Skia"

parents 99d753b4 36b73a89
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -276,8 +276,8 @@ CachedGlyphInfo* Font::getCachedGlyph(const SkPaint* paint, glyph_t textUnit, bo
            SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry);
            SkAutoGlyphCacheNoGamma autoCache(*paint, &surfaceProps,
                                              &mDescription.mLookupTransform);
            const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), textUnit);
            updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), cachedGlyph, precaching);
            const SkGlyph& skiaGlyph = GET_METRICS(autoCache.get(), textUnit);
            updateGlyphCache(paint, skiaGlyph, autoCache.get(), cachedGlyph, precaching);
        }
    } else {
        cachedGlyph = cacheGlyph(paint, textUnit, precaching);
@@ -464,11 +464,11 @@ CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool prec

    SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry);
    SkAutoGlyphCacheNoGamma autoCache(*paint, &surfaceProps, &mDescription.mLookupTransform);
    const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph);
    const SkGlyph& skiaGlyph = GET_METRICS(autoCache.get(), glyph);
    newGlyph->mIsValid = false;
    newGlyph->mGlyphIndex = skiaGlyph.fID;

    updateGlyphCache(paint, skiaGlyph, autoCache.getCache(), newGlyph, precaching);
    updateGlyphCache(paint, skiaGlyph, autoCache.get(), newGlyph, precaching);

    return newGlyph;
}
+2 −2
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ void TestUtils::layoutTextUnscaled(const SkPaint& paint, const char* text,
        int32_t unichar = utf32_from_utf8_at(text, 4, 0, &nextIndex);
        text += nextIndex;

        glyph_t glyph = autoCache.getCache()->unicharToGlyph(unichar);
        glyph_t glyph = autoCache.get()->unicharToGlyph(unichar);
        autoCache.getCache()->unicharToGlyph(unichar);

        // push glyph and its relative position
@@ -105,7 +105,7 @@ void TestUtils::layoutTextUnscaled(const SkPaint& paint, const char* text,
        outPositions->push_back(0);

        // compute bounds
        SkGlyph skGlyph = autoCache.getCache()->getUnicharMetrics(unichar);
        SkGlyph skGlyph = autoCache.get()->getUnicharMetrics(unichar);
        Rect glyphBounds(skGlyph.fWidth, skGlyph.fHeight);
        glyphBounds.translate(totalAdvance + skGlyph.fLeft, skGlyph.fTop);
        bounds.unionWith(glyphBounds);