| Index: src/gpu/GrContext.cpp
|
| ===================================================================
|
| --- src/gpu/GrContext.cpp (revision 13407)
|
| +++ src/gpu/GrContext.cpp (working copy)
|
| @@ -1148,18 +1148,16 @@
|
|
|
| GrPathRendererChain::DrawType type =
|
| useCoverageAA ? GrPathRendererChain::kColorAntiAlias_DrawType :
|
| - GrPathRendererChain::kColor_DrawType;
|
| + GrPathRendererChain::kColor_DrawType;
|
|
|
| const SkPath* pathPtr = &path;
|
| SkTLazy<SkPath> tmpPath;
|
| SkTCopyOnFirstWrite<SkStrokeRec> stroke(origStroke);
|
|
|
| // Try a 1st time without stroking the path and without allowing the SW renderer
|
| - GrPathRenderer::AutoClearPath acp(this->getPathRenderer(*pathPtr, *stroke,
|
| - target, false, type,
|
| - pathPtr->getFillType()));
|
| + GrPathRenderer* pr = this->getPathRenderer(*pathPtr, *stroke, target, false, type);
|
|
|
| - if (NULL == acp.renderer()) {
|
| + if (NULL == pr) {
|
| 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)) {
|
| @@ -1172,18 +1170,17 @@
|
| }
|
|
|
| // This time, allow SW renderer
|
| - acp.set(this->getPathRenderer(*pathPtr, *stroke, target, true, type,
|
| - pathPtr->getFillType()));
|
| + pr = this->getPathRenderer(*pathPtr, *stroke, target, true, type);
|
| }
|
|
|
| - if (NULL == acp.renderer()) {
|
| + if (NULL == pr) {
|
| #ifdef SK_DEBUG
|
| GrPrintf("Unable to find path renderer compatible with path.\n");
|
| #endif
|
| return;
|
| }
|
|
|
| - acp->drawPath(*stroke, target, useCoverageAA);
|
| + pr->drawPath(*pathPtr, *stroke, target, useCoverageAA);
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -1679,7 +1676,6 @@
|
| const GrDrawTarget* target,
|
| bool allowSW,
|
| GrPathRendererChain::DrawType drawType,
|
| - SkPath::FillType fillType,
|
| GrPathRendererChain::StencilSupport* stencilSupport) {
|
|
|
| if (NULL == fPathRendererChain) {
|
| @@ -1690,7 +1686,6 @@
|
| stroke,
|
| target,
|
| drawType,
|
| - fillType,
|
| stencilSupport);
|
|
|
| if (NULL == pr && allowSW) {
|
| @@ -1698,7 +1693,6 @@
|
| fSoftwarePathRenderer = SkNEW_ARGS(GrSoftwarePathRenderer, (this));
|
| }
|
| pr = fSoftwarePathRenderer;
|
| - pr->setPath(path, fillType);
|
| }
|
|
|
| return pr;
|
|
|