diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 69c13baf69..5ad6d921d8 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -19,6 +19,7 @@ #include "include/utils/SkPaintFilterCanvas.h" #include "src/core/SkAutoPixmapStorage.h" #include "src/core/SkColorSpacePriv.h" +#include "src/core/SkGlyphRun.h" #include "src/core/SkImagePriv.h" #include "src/core/SkMD5.h" #include "src/core/SkOSFile.h" @@ -1383,6 +1384,16 @@ public: this->SkPaintFilterCanvas::onDrawTextBlob( this->filterTextBlob(paint, blob, &cache), x, y, paint); } + + void onDrawGlyphRunList(const SkGlyphRunList& glyphRunList, const SkPaint& paint) override { + sk_sp cache; + sk_sp blob = glyphRunList.makeBlob(); + this->filterTextBlob(paint, blob.get(), &cache); + SkGlyphRunBuilder builder; + const SkGlyphRunList& filtered = builder.blobToGlyphRunList(*cache, glyphRunList.origin()); + this->SkPaintFilterCanvas::onDrawGlyphRunList(filtered, paint); + } + bool filterFont(SkTCopyOnFirstWrite* font) const { if (fFontOverrides->fTypeface) { font->writable()->setTypeface(fFont->refTypeface());