diff options
author | Brian Osman <brianosman@google.com> | 2018-03-08 14:52:20 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-08 20:13:41 +0000 |
commit | 3adc12213b2d1efbe417476517ff3381af17a311 (patch) | |
tree | ba9af5e434a667ffd5c788d9b6b32f5e5187eb66 /src/utils/SkPaintFilterCanvas.cpp | |
parent | a3457b8452a24c04a77a5ab32fc6464e005c76a1 (diff) |
Fill in some missing virtuals from canvas subclasses
Bug: skia:
Change-Id: If7306fa6c5a1619952e1159e6ebca8f04b4d9c8e
Reviewed-on: https://skia-review.googlesource.com/113262
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/utils/SkPaintFilterCanvas.cpp')
-rw-r--r-- | src/utils/SkPaintFilterCanvas.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/utils/SkPaintFilterCanvas.cpp b/src/utils/SkPaintFilterCanvas.cpp index 668ebe37a9..37a7d44bd5 100644 --- a/src/utils/SkPaintFilterCanvas.cpp +++ b/src/utils/SkPaintFilterCanvas.cpp @@ -78,6 +78,13 @@ void SkPaintFilterCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inne } } +void SkPaintFilterCanvas::onDrawRegion(const SkRegion& region, const SkPaint& paint) { + AutoPaintFilter apf(this, kPath_Type, paint); + if (apf.shouldDraw()) { + this->INHERITED::onDrawRegion(region, *apf.paint()); + } +} + void SkPaintFilterCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { AutoPaintFilter apf(this, kOval_Type, paint); if (apf.shouldDraw()) { @@ -124,6 +131,14 @@ void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce } } +void SkPaintFilterCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, + const SkRect& dst, const SkPaint* paint) { + AutoPaintFilter apf(this, kBitmap_Type, paint); + if (apf.shouldDraw()) { + this->INHERITED::onDrawBitmapLattice(bitmap, lattice, dst, apf.paint()); + } +} + void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top, const SkPaint* paint) { AutoPaintFilter apf(this, kBitmap_Type, paint); @@ -142,13 +157,21 @@ void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* sr } void SkPaintFilterCanvas::onDrawImageNine(const SkImage* image, const SkIRect& center, - const SkRect& dst, const SkPaint* paint) { + const SkRect& dst, const SkPaint* paint) { AutoPaintFilter apf(this, kBitmap_Type, paint); if (apf.shouldDraw()) { this->INHERITED::onDrawImageNine(image, center, dst, apf.paint()); } } +void SkPaintFilterCanvas::onDrawImageLattice(const SkImage* image, const Lattice& lattice, + const SkRect& dst, const SkPaint* paint) { + AutoPaintFilter apf(this, kBitmap_Type, paint); + if (apf.shouldDraw()) { + this->INHERITED::onDrawImageLattice(image, lattice, dst, apf.paint()); + } +} + void SkPaintFilterCanvas::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmode, const SkPaint& paint) { AutoPaintFilter apf(this, kVertices_Type, paint); @@ -233,6 +256,15 @@ void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS } } +void SkPaintFilterCanvas::onDrawAtlas(const SkImage* image, const SkRSXform xform[], + const SkRect tex[], const SkColor colors[], int count, + SkBlendMode bmode, const SkRect* cull, const SkPaint* paint) { + AutoPaintFilter apf(this, kBitmap_Type, paint); + if (apf.shouldDraw()) { + this->INHERITED::onDrawAtlas(image, xform, tex, colors, count, bmode, cull, apf.paint()); + } +} + sk_sp<SkSurface> SkPaintFilterCanvas::onNewSurface(const SkImageInfo& info, const SkSurfaceProps& props) { return proxy()->makeSurface(info, &props); |