Index: src/core/SkDraw.cpp |
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp |
index 7eb0be6b6b229a04ece584a747e5bdfaeecebd79..517c800cb43364e65378a09f633c15f98ff55aa1 100644 |
--- a/src/core/SkDraw.cpp |
+++ b/src/core/SkDraw.cpp |
@@ -1118,6 +1118,13 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, |
SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, *paint, drawCoverage); |
+ // make sure the path will not be inverse-stroked. hairlineStroke + fill = fill, |
+ // they can be inverse-filled. |
+ if (devPathPtr->isInverseFillType() && (SkPaint::kStroke_Style == paint->getStyle() || |
+ (SkPaint::kStrokeAndFill_Style == paint->getStyle() && paint->getStrokeWidth() > 0))) { |
+ devPathPtr->toggleInverseFillType(); |
+ } |
+ |
if (paint->getMaskFilter()) { |
SkPaint::Style style = doFill ? SkPaint::kFill_Style : |
SkPaint::kStroke_Style; |