aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDraw.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-02-06 14:59:38 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-06 20:22:45 +0000
commit953c19403801d245477e7ecc5a8aab74052a5cbd (patch)
tree71dccfba9121c138945424796fa4420808213da0 /src/core/SkDraw.cpp
parent703d9c47a8f3e47514eaefeb4939bc02004fef5e (diff)
Can't correctly call computeFastBounds on maskfilter w/ device geo
maskfilter's computeFastBounds assumes the passed-in geometry bounds is in src space, but in drawDevPath the bounds is in device space, so this call can return meaningless answers. Skip this whole block of code, since filterPath itself performs culling. Bug: skia: Change-Id: Ia668d8b692ce77332fa16908e9b0cf774c189e11 Reviewed-on: https://skia-review.googlesource.com/104520 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r--src/core/SkDraw.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 3e4722be4d..d2d2307046 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -952,27 +952,6 @@ SkScalar SkDraw::ComputeResScaleForStroking(const SkMatrix& matrix) {
void SkDraw::drawDevPath(const SkPath& devPath, const SkPaint& paint, bool drawCoverage,
SkBlitter* customBlitter, bool doFill) const {
- // Do a conservative quick-reject test, since a looper or other modifier may have moved us
- // out of range.
- if (!devPath.isInverseFillType()) {
- // If we're a H or V line, our bounds will be empty. So we bloat here just so we don't
- // appear empty to the intersects call. This also gives us slop in case we're antialiasing
- SkRect pathBounds = devPath.getBounds().makeOutset(1, 1);
-
- if (paint.getMaskFilter()) {
- 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
- pathBounds.outset(7, 7);
- }
-
- // Now compare against the clip's bounds
- if (!SkRect::Make(fRC->getBounds()).intersects(pathBounds)) {
- return;
- }
- }
-
SkBlitter* blitter = nullptr;
SkAutoBlitterChoose blitterStorage;
if (nullptr == customBlitter) {