Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: src/gpu/GrContext.cpp

Issue 142543007: Revert of r13384 (Stateful PathRenderer implementation) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDefaultPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDefaultPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698