update NWay canvas with onDrawSlug

Change-Id: I8b01ecfbbd7295d1109d624b64c162d8e31e18ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523676
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
Herb Derby 2022-03-22 16:07:50 -04:00 committed by SkCQ
parent a11e221a13
commit 399be2e211
2 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,9 @@ protected:
void onDrawGlyphRunList(const SkGlyphRunList&, const SkPaint&) override;
void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
const SkPaint& paint) override;
#if SK_SUPPORT_GPU
void onDrawSlug(const GrSlug* slug) override;
#endif
void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], SkBlendMode, const SkPaint& paint) override;

View File

@ -292,6 +292,15 @@ void SkNWayCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y
}
}
#if SK_SUPPORT_GPU
void SkNWayCanvas::onDrawSlug(const GrSlug* slug) {
Iter iter(fList);
while (iter.next()) {
iter->drawSlug(slug);
}
}
#endif
void SkNWayCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix,
const SkPaint* paint) {
Iter iter(fList);