aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-02 21:26:50 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-02 21:26:50 +0000
commitc2099d2707abcc94e139627399aed4b8894b69bb (patch)
treef66f3a950979a6df3d1abf90088d2cf94942025c /src/gpu/GrGpu.cpp
parent6a81b8a282dd388044c433a4c2d8e549e7402d01 (diff)
simplify GrPathRenderer interface
Review URL: http://codereview.appspot.com/5706053/ git-svn-id: http://skia.googlecode.com/svn/trunk@3312 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r--src/gpu/GrGpu.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index a14de7361d..32338ca368 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -632,7 +632,6 @@ bool GrGpu::setupClipAndFlushState(GrPrimitiveType type) {
GrPathRenderer* pr = NULL;
const GrPath* clipPath = NULL;
- GrPathRenderer::AutoClearPath arp;
if (kRect_ClipType == clip.getElementType(c)) {
canRenderDirectToStencil = true;
fill = kEvenOdd_PathFill;
@@ -655,8 +654,7 @@ bool GrGpu::setupClipAndFlushState(GrPrimitiveType type) {
return false;
}
canRenderDirectToStencil =
- !pr->requiresStencilPass(this, *clipPath, fill);
- arp.set(pr, this, clipPath, fill, false, NULL);
+ !pr->requiresStencilPass(*clipPath, fill, this);
}
GrSetOp op = (c == start) ? startOp : clip.getOp(c);
@@ -690,9 +688,9 @@ bool GrGpu::setupClipAndFlushState(GrPrimitiveType type) {
} else {
if (canRenderDirectToStencil) {
*drawState->stencil() = gDrawToStencil;
- pr->drawPath(0);
+ pr->drawPath(*clipPath, fill, NULL, this, 0, false);
} else {
- pr->drawPathToStencil();
+ pr->drawPathToStencil(*clipPath, fill, this);
}
}
}
@@ -708,7 +706,7 @@ bool GrGpu::setupClipAndFlushState(GrPrimitiveType type) {
this->drawSimpleRect(clip.getRect(c), NULL, 0);
} else {
SET_RANDOM_COLOR
- pr->drawPath(0);
+ pr->drawPath(*clipPath, fill, NULL, this, 0, false);
}
} else {
SET_RANDOM_COLOR
@@ -739,8 +737,7 @@ GrPathRenderer* GrGpu::getClipPathRenderer(const GrPath& path,
new GrPathRendererChain(this->getContext(),
GrPathRendererChain::kNonAAOnly_UsageFlag);
}
- return fPathRendererChain->getPathRenderer(this->getCaps(),
- path, fill, false);
+ return fPathRendererChain->getPathRenderer(path, fill, this, false);
}