From 61a237e319a63b7ed6d38c2f3cd9b597816c3a46 Mon Sep 17 00:00:00 2001 From: fmalita Date: Tue, 12 Jan 2016 12:14:10 -0800 Subject: [PATCH] SkPaintFilterCanvas cleanup All external clients have been updated, we can now remove the transitional kludges. BUG=skia:4782 R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574303003 Review URL: https://codereview.chromium.org/1574303003 --- include/core/SkDrawFilter.h | 2 ++ include/utils/SkPaintFilterCanvas.h | 10 +--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/core/SkDrawFilter.h b/include/core/SkDrawFilter.h index 865df5f..2812017 100644 --- a/include/core/SkDrawFilter.h +++ b/include/core/SkDrawFilter.h @@ -16,6 +16,8 @@ class SkCanvas; 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 diff --git a/include/utils/SkPaintFilterCanvas.h b/include/utils/SkPaintFilterCanvas.h index 35e3221..909cf3b 100644 --- a/include/utils/SkPaintFilterCanvas.h +++ b/include/utils/SkPaintFilterCanvas.h @@ -58,15 +58,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(SkTCopyOnFirstWrite* 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* paint, Type type) const = 0; void onDrawPaint(const SkPaint&) override; void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; -- 2.7.4