class SkPaint;
/**
+ * DEPRECATED - use SkPaintFilterCanvas instead.
+ *
* Right before something is being draw, filter() is called with the
* paint. The filter may modify the paint as it wishes, which will then be
* used for the actual drawing. Note: this modification only lasts for the
* To also filter encapsulated paints (e.g. SkPicture, SkTextBlob), clients may need to
* override the relevant methods (i.e. drawPicture, drawTextBlob).
*/
- virtual bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const {
- if (*paint) {
- this->onFilterPaint(paint->writable(), type);
- }
- return true;
- }
-
- // DEPRECATED - do not use
- virtual void onFilterPaint(SkPaint*, Type) const { }
+ virtual bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type type) const = 0;
void onDrawPaint(const SkPaint&) override;
void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override;