SkPaintFilterCanvas cleanup
authorfmalita <fmalita@chromium.org>
Tue, 12 Jan 2016 20:14:10 +0000 (12:14 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 Jan 2016 20:14:10 +0000 (12:14 -0800)
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
include/utils/SkPaintFilterCanvas.h

index 865df5f..2812017 100644 (file)
@@ -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
index 35e3221..909cf3b 100644 (file)
@@ -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<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;