Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 7d53071a0e79ace0ef7357a059d250c168ef954a..7b1c4c547cf75529f5ec106335085bcfd78cdabb 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -1444,19 +1444,20 @@ void GrContext::internalDrawPath(GrDrawTarget* target, |
const SkPath* pathPtr = &path; |
SkTLazy<SkPath> tmpPath; |
- SkTCopyOnFirstWrite<SkStrokeRec> stroke(strokeInfo.getStrokeRec()); |
+ GrStrokeInfo stroke(strokeInfo); |
// Try a 1st time without stroking the path and without allowing the SW renderer |
GrPathRenderer* pr = this->getPathRenderer(target, pipelineBuilder, viewMatrix, *pathPtr, |
- *stroke, false, type); |
+ stroke, false, type); |
if (NULL == pr) { |
- if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(*stroke, viewMatrix, NULL)) { |
+ if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(stroke.getStrokeRec(), viewMatrix, |
+ NULL)) { |
// It didn't work the 1st time, so try again with the stroked path |
- stroke.writable()->setResScale(SkScalarAbs(viewMatrix.getMaxScale())); |
- if (stroke->applyToPath(tmpPath.init(), *pathPtr)) { |
+ stroke.getStrokeRecPtr()->setResScale(SkScalarAbs(viewMatrix.getMaxScale())); |
+ if (stroke.getStrokeRec().applyToPath(tmpPath.init(), *pathPtr)) { |
bsalomon
2015/04/16 17:53:38
need to apply path effect here, right?
|
pathPtr = tmpPath.get(); |
- stroke.writable()->setFillStyle(); |
+ stroke.getStrokeRecPtr()->setFillStyle(); |
bsalomon
2015/04/16 17:52:18
Seems like this should also remove the path effect
|
if (pathPtr->isEmpty()) { |
return; |
} |
@@ -1464,7 +1465,7 @@ void GrContext::internalDrawPath(GrDrawTarget* target, |
} |
// This time, allow SW renderer |
- pr = this->getPathRenderer(target, pipelineBuilder, viewMatrix, *pathPtr, *stroke, true, |
+ pr = this->getPathRenderer(target, pipelineBuilder, viewMatrix, *pathPtr, stroke, true, |
type); |
} |
@@ -1475,7 +1476,7 @@ void GrContext::internalDrawPath(GrDrawTarget* target, |
return; |
} |
- pr->drawPath(target, pipelineBuilder, color, viewMatrix, *pathPtr, *stroke, useCoverageAA); |
+ pr->drawPath(target, pipelineBuilder, color, viewMatrix, *pathPtr, stroke, useCoverageAA); |
} |
//////////////////////////////////////////////////////////////////////////////// |
@@ -1872,7 +1873,7 @@ GrPathRenderer* GrContext::getPathRenderer(const GrDrawTarget* target, |
const GrPipelineBuilder* pipelineBuilder, |
const SkMatrix& viewMatrix, |
const SkPath& path, |
- const SkStrokeRec& stroke, |
+ const GrStrokeInfo& stroke, |
bool allowSW, |
GrPathRendererChain::DrawType drawType, |
GrPathRendererChain::StencilSupport* stencilSupport) { |