diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 958581f345..106b61ee53 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -2271,8 +2271,8 @@ protected: #if SK_SUPPORT_GPU /** Experimental */ - virtual sk_sp doConvertBlobToSlug( - const SkTextBlob& blob, SkPoint origin, const SkPaint& paint); + virtual sk_sp onConvertGlyphRunListToSlug( + const SkGlyphRunList& glyphRunList, const SkPaint& paint); /** Experimental */ diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index dfd88abbb5..c708b8c636 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2332,13 +2332,12 @@ void SkCanvas::onDrawGlyphRunList(const SkGlyphRunList& glyphRunList, const SkPa sk_sp SkCanvas::convertBlobToSlug( const SkTextBlob& blob, SkPoint origin, const SkPaint& paint) { TRACE_EVENT0("skia", TRACE_FUNC); - - return this->doConvertBlobToSlug(blob, origin, paint); + auto glyphRunList = fScratchGlyphRunBuilder->blobToGlyphRunList(blob, origin); + return this->onConvertGlyphRunListToSlug(glyphRunList, paint); } sk_sp -SkCanvas::doConvertBlobToSlug(const SkTextBlob& blob, SkPoint origin, const SkPaint& paint) { - auto glyphRunList = fScratchGlyphRunBuilder->blobToGlyphRunList(blob, origin); +SkCanvas::onConvertGlyphRunListToSlug(const SkGlyphRunList& glyphRunList, const SkPaint& paint) { SkRect bounds = glyphRunList.sourceBounds(); if (bounds.isEmpty() || !bounds.isFinite() || paint.nothingToDraw()) { return nullptr;