aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDraw.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-23 15:29:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 21:14:20 +0000
commit80747ef591ff3c09c2b610eb21258132d1ff4ef5 (patch)
treee7472d73f966f9400b0e52cb02ad9e8515de32c3 /src/core/SkDraw.cpp
parenta7701e032bcc55a73360aa8d1b53ceef566de991 (diff)
move the guts of SkMaskFilter.h into SkMaskFilterBase.h
Bug: skia: Change-Id: I29ad0960156562867429542d3cfbf3d639529cab Reviewed-on: https://skia-review.googlesource.com/98802 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r--src/core/SkDraw.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 20ce379cd6..3e4722be4d 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -18,7 +18,7 @@
#include "SkDraw.h"
#include "SkDrawProcs.h"
#include "SkFindAndPlaceGlyph.h"
-#include "SkMaskFilter.h"
+#include "SkMaskFilterBase.h"
#include "SkMatrix.h"
#include "SkMatrixUtils.h"
#include "SkPaint.h"
@@ -842,7 +842,7 @@ void SkDraw::drawDevMask(const SkMask& srcM, const SkPaint& paint) const {
SkMask dstM;
if (paint.getMaskFilter() &&
- paint.getMaskFilter()->filterMask(&dstM, srcM, *fMatrix, nullptr)) {
+ as_MFB(paint.getMaskFilter())->filterMask(&dstM, srcM, *fMatrix, nullptr)) {
mask = &dstM;
}
SkAutoMaskFreeImage ami(dstM.fImage);
@@ -922,7 +922,8 @@ void SkDraw::drawRRect(const SkRRect& rrect, const SkPaint& paint) const {
SkRRect devRRect;
if (rrect.transform(*fMatrix, &devRRect)) {
SkAutoBlitterChoose blitter(fDst, *fMatrix, paint);
- if (paint.getMaskFilter()->filterRRect(devRRect, *fMatrix, *fRC, blitter.get())) {
+ if (as_MFB(paint.getMaskFilter())->filterRRect(devRRect, *fMatrix,
+ *fRC, blitter.get())) {
return; // filterRRect() called the blitter, so we're done
}
}
@@ -959,7 +960,7 @@ void SkDraw::drawDevPath(const SkPath& devPath, const SkPaint& paint, bool drawC
SkRect pathBounds = devPath.getBounds().makeOutset(1, 1);
if (paint.getMaskFilter()) {
- paint.getMaskFilter()->computeFastBounds(pathBounds, &pathBounds);
+ as_MFB(paint.getMaskFilter())->computeFastBounds(pathBounds, &pathBounds);
// Need to outset the path to work-around a bug in blurmaskfilter. When that is fixed
// we can remove this hack. See skbug.com/5542
@@ -984,7 +985,7 @@ void SkDraw::drawDevPath(const SkPath& devPath, const SkPaint& paint, bool drawC
if (paint.getMaskFilter()) {
SkStrokeRec::InitStyle style = doFill ? SkStrokeRec::kFill_InitStyle
: SkStrokeRec::kHairline_InitStyle;
- if (paint.getMaskFilter()->filterPath(devPath, *fMatrix, *fRC, blitter, style)) {
+ if (as_MFB(paint.getMaskFilter())->filterPath(devPath, *fMatrix, *fRC, blitter, style)) {
return; // filterPath() called the blitter, so we're done
}
}
@@ -1659,7 +1660,7 @@ static bool compute_bounds(const SkPath& devPath, const SkIRect* clipBounds,
srcM.fBounds = *bounds;
srcM.fFormat = SkMask::kA8_Format;
- if (!filter->filterMask(&dstM, srcM, *filterMatrix, &margin)) {
+ if (!as_MFB(filter)->filterMask(&dstM, srcM, *filterMatrix, &margin)) {
return false;
}
}