diff options
-rw-r--r-- | src/core/SkDraw.cpp | 6 | ||||
-rw-r--r-- | src/core/SkThreadedBMPDevice.h | 7 |
2 files changed, 12 insertions, 1 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; } diff --git a/src/core/SkThreadedBMPDevice.h b/src/core/SkThreadedBMPDevice.h index 3f0984110b..acdbc62414 100644 --- a/src/core/SkThreadedBMPDevice.h +++ b/src/core/SkThreadedBMPDevice.h @@ -174,7 +174,7 @@ private: DrawQueue fQueue; - friend struct SkInitOnceData; // to access DrawElement + friend struct SkInitOnceData; // to access DrawElement and DrawState friend class SkDraw; // to access DrawState typedef SkBitmapDevice INHERITED; @@ -185,6 +185,11 @@ private: struct SkInitOnceData { SkArenaAlloc* fAlloc; SkThreadedBMPDevice::DrawElement* fElement; + + void setEmptyDrawFn() { + fElement->setDrawFn([](SkArenaAlloc* threadAlloc, const SkThreadedBMPDevice::DrawState& ds, + const SkIRect& tileBounds){}); + } }; #endif // SkThreadedBMPDevice_DEFINED |