Remove deprecated SkPaintFilterCanvas::onFilter.

No longer used by any clients. The new onFilter is made pure virtual to
enforce that it is implemented and the existing fallback forwarding
implementation is removed.

Change-Id: I8ce522db78d28a1e83779fbfa6979e6e16a0cee5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208507
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2019-04-16 10:30:57 -04:00 committed by Skia Commit-Bot
parent 0e3342cfcd
commit 393981d1db
2 changed files with 1 additions and 17 deletions

View File

@ -38,8 +38,6 @@ public:
}
protected:
/** DEPRECATED */
virtual bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const;
/**
* Called with the paint that will be used to draw the specified type.
* The implementation may modify the paint as they wish.
@ -51,7 +49,7 @@ protected:
* To also filter encapsulated paints (e.g. SkPicture, SkTextBlob), clients may need to
* override the relevant methods (i.e. drawPicture, drawTextBlob).
*/
virtual bool onFilter(SkPaint& paint) const;
virtual bool onFilter(SkPaint& paint) const = 0;
void onDrawPaint(const SkPaint&) override;
void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override;

View File

@ -31,20 +31,6 @@ private:
bool fShouldDraw;
};
bool SkPaintFilterCanvas::onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const {
SK_ABORT("Not reached");
return false;
}
bool SkPaintFilterCanvas::onFilter(SkPaint& paint) const {
SkTCopyOnFirstWrite<SkPaint> p(paint);
bool shouldDraw = this->onFilter(&p, kPicture_Type);
if (p.get() != &paint) {
paint = *p;
}
return shouldDraw;
}
SkPaintFilterCanvas::SkPaintFilterCanvas(SkCanvas *canvas)
: SkCanvasVirtualEnforcer<SkNWayCanvas>(canvas->imageInfo().width(),
canvas->imageInfo().height()) {