aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDraw.cpp
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2018-02-23 14:59:32 +0800
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-25 16:31:49 +0000
commit3fd84fa4bff159db472db166ca31bdf969f143bb (patch)
tree876768f1a06821147550c9476f27770156e81a0c /src/core/SkDraw.cpp
parent8a3f65421214a21c480d6ee268eb29f2c5769078 (diff)
Set empty drawFn when init-once returns early
Bug: skia: Change-Id: I01def2c2c9651585555740e5ab86f8eac38be6fc Reviewed-on: https://skia-review.googlesource.com/109721 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r--src/core/SkDraw.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 4b847db295..6f8ee30602 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -972,6 +972,9 @@ void SkDraw::drawDevPath(const SkPath& devPath, const SkPaint& paint, bool drawC
SkStrokeRec::InitStyle style = doFill ? SkStrokeRec::kFill_InitStyle
: SkStrokeRec::kHairline_InitStyle;
if (as_MFB(paint.getMaskFilter())->filterPath(devPath, *fMatrix, *fRC, blitter, style)) {
+ if (iData) {
+ iData->setEmptyDrawFn();
+ }
return; // filterPath() called the blitter, so we're done
}
}
@@ -1053,6 +1056,9 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint,
// nothing to draw
if (fRC->isEmpty()) {
+ if (iData) {
+ iData->setEmptyDrawFn();
+ }
return;
}