divide the slug conversion calls at a better place
Change-Id: I1e7f7b01356582dcb507a2ef768c97df0e02c561 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523999 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
7183f29125
commit
396fa1cea1
@ -2271,8 +2271,8 @@ protected:
|
|||||||
#if SK_SUPPORT_GPU
|
#if SK_SUPPORT_GPU
|
||||||
/** Experimental
|
/** Experimental
|
||||||
*/
|
*/
|
||||||
virtual sk_sp<GrSlug> doConvertBlobToSlug(
|
virtual sk_sp<GrSlug> onConvertGlyphRunListToSlug(
|
||||||
const SkTextBlob& blob, SkPoint origin, const SkPaint& paint);
|
const SkGlyphRunList& glyphRunList, const SkPaint& paint);
|
||||||
|
|
||||||
/** Experimental
|
/** Experimental
|
||||||
*/
|
*/
|
||||||
|
@ -2332,13 +2332,12 @@ void SkCanvas::onDrawGlyphRunList(const SkGlyphRunList& glyphRunList, const SkPa
|
|||||||
sk_sp<GrSlug> SkCanvas::convertBlobToSlug(
|
sk_sp<GrSlug> SkCanvas::convertBlobToSlug(
|
||||||
const SkTextBlob& blob, SkPoint origin, const SkPaint& paint) {
|
const SkTextBlob& blob, SkPoint origin, const SkPaint& paint) {
|
||||||
TRACE_EVENT0("skia", TRACE_FUNC);
|
TRACE_EVENT0("skia", TRACE_FUNC);
|
||||||
|
auto glyphRunList = fScratchGlyphRunBuilder->blobToGlyphRunList(blob, origin);
|
||||||
return this->doConvertBlobToSlug(blob, origin, paint);
|
return this->onConvertGlyphRunListToSlug(glyphRunList, paint);
|
||||||
}
|
}
|
||||||
|
|
||||||
sk_sp<GrSlug>
|
sk_sp<GrSlug>
|
||||||
SkCanvas::doConvertBlobToSlug(const SkTextBlob& blob, SkPoint origin, const SkPaint& paint) {
|
SkCanvas::onConvertGlyphRunListToSlug(const SkGlyphRunList& glyphRunList, const SkPaint& paint) {
|
||||||
auto glyphRunList = fScratchGlyphRunBuilder->blobToGlyphRunList(blob, origin);
|
|
||||||
SkRect bounds = glyphRunList.sourceBounds();
|
SkRect bounds = glyphRunList.sourceBounds();
|
||||||
if (bounds.isEmpty() || !bounds.isFinite() || paint.nothingToDraw()) {
|
if (bounds.isEmpty() || !bounds.isFinite() || paint.nothingToDraw()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user