diff options
author | Ben Wagner <bungeman@google.com> | 2018-06-27 14:46:46 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-12 02:36:44 +0000 |
commit | 2c312c4f58f9c151acab8ca2dd0d39fb77c5e74a (patch) | |
tree | 527d8ef60903f99e54cc83615a051c8b65e046bb /src/core/SkDevice.cpp | |
parent | 0859252397e0a771669d21d173a8a20f814b7ca0 (diff) |
Remove SkDrawFilter.
Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af
Reviewed-on: https://skia-review.googlesource.com/137895
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r-- | src/core/SkDevice.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 2b7fef62fb..b6f52913eb 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -9,7 +9,6 @@ #include "SkColorFilter.h" #include "SkDraw.h" -#include "SkDrawFilter.h" #include "SkGlyphRun.h" #include "SkImageFilter.h" #include "SkImageFilterCache.h" @@ -141,7 +140,7 @@ void SkBaseDevice::drawPatch(const SkPoint cubics[12], const SkColor colors[4], } void SkBaseDevice::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint &paint, SkDrawFilter* drawFilter) { + const SkPaint &paint) { SkPaint runPaint = paint; @@ -153,12 +152,6 @@ void SkBaseDevice::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, // so it is safe to not re-seed the paint for this reason. it.applyFontToPaint(&runPaint); - if (drawFilter && !drawFilter->filter(&runPaint, SkDrawFilter::kText_Type)) { - // A false return from filter() means we should abort the current draw. - runPaint = paint; - continue; - } - switch (it.positioning()) { case SkTextBlob::kDefault_Positioning: { auto origin = SkPoint::Make(x + offset.x(), y + offset.y()); @@ -179,11 +172,6 @@ void SkBaseDevice::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, default: SK_ABORT("unhandled positioning mode"); } - - if (drawFilter) { - // A draw filter may change the paint arbitrarily, so we must re-seed in this case. - runPaint = paint; - } } } |