aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-11 16:30:21 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-11 16:30:21 +0000
commite79f320ed6c5ec9f6164ba84be1ff586532e6517 (patch)
treef3c649d3be2f8d1ebea5f8a2fc438d1b507cdb9f /src/gpu/GrContext.cpp
parent27d7ede2e64bddeacce4a0d83bc055bf966cce2f (diff)
Revert of r13384 (Stateful PathRenderer implementation)
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r--src/gpu/GrContext.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index ab20dc3902..bb0f4fa9fa 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1148,18 +1148,16 @@ void GrContext::internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath&
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 @@ void GrContext::internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath&
}
// 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 @@ GrPathRenderer* GrContext::getPathRenderer(const SkPath& path,
const GrDrawTarget* target,
bool allowSW,
GrPathRendererChain::DrawType drawType,
- SkPath::FillType fillType,
GrPathRendererChain::StencilSupport* stencilSupport) {
if (NULL == fPathRendererChain) {
@@ -1690,7 +1686,6 @@ GrPathRenderer* GrContext::getPathRenderer(const SkPath& path,
stroke,
target,
drawType,
- fillType,
stencilSupport);
if (NULL == pr && allowSW) {
@@ -1698,7 +1693,6 @@ GrPathRenderer* GrContext::getPathRenderer(const SkPath& path,
fSoftwarePathRenderer = SkNEW_ARGS(GrSoftwarePathRenderer, (this));
}
pr = fSoftwarePathRenderer;
- pr->setPath(path, fillType);
}
return pr;