Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 90bf8c042e498cc2e1ec3f2547f1ea586a919b51..0f64e2126e6361da21191c0dd1eb3286426ec472 100644 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -1207,6 +1207,11 @@ void GrContext::internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& |
if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(*stroke, this->getMatrix(), NULL)) { |
// It didn't work the 1st time, so try again with the stroked path |
if (stroke->applyToPath(tmpPath.init(), *pathPtr)) { |
+ // make sure the path will not be inverse-stroked |
bsalomon
2014/04/23 15:06:12
Shouldn't applyToPath just return a path with the
yunchao
2014/04/24 16:12:43
applyToPath doesn't change the style. For a stroke
bsalomon
2014/04/24 17:33:21
It *should* set the correct fill type.
|
+ if (SkStrokeRec::kFill_Style != stroke->getStyle() && |
+ tmpPath.get()->isInverseFillType()) { |
+ tmpPath.get()->toggleInverseFillType(); |
+ } |
pathPtr = tmpPath.get(); |
stroke.writable()->setFillStyle(); |
if (pathPtr->isEmpty()) { |