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

Unified Diff: src/gpu/GrStencilAndCoverPathRenderer.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/GrStencilAndCoverPathRenderer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverPathRenderer.cpp
===================================================================
--- src/gpu/GrStencilAndCoverPathRenderer.cpp (revision 13407)
+++ src/gpu/GrStencilAndCoverPathRenderer.cpp (working copy)
@@ -34,7 +34,8 @@
fGpu->unref();
}
-bool GrStencilAndCoverPathRenderer::canDrawPath(const SkStrokeRec& stroke,
+bool GrStencilAndCoverPathRenderer::canDrawPath(const SkPath& path,
+ const SkStrokeRec& stroke,
const GrDrawTarget* target,
bool antiAlias) const {
return !stroke.isHairlineStyle() &&
@@ -44,19 +45,22 @@
}
GrPathRenderer::StencilSupport GrStencilAndCoverPathRenderer::onGetStencilSupport(
+ const SkPath&,
const SkStrokeRec& ,
const GrDrawTarget*) const {
return GrPathRenderer::kStencilOnly_StencilSupport;
}
-void GrStencilAndCoverPathRenderer::onStencilPath(const SkStrokeRec& stroke,
+void GrStencilAndCoverPathRenderer::onStencilPath(const SkPath& path,
+ const SkStrokeRec& stroke,
GrDrawTarget* target) {
- SkASSERT(!this->path().isInverseFillType());
- SkAutoTUnref<GrPath> p(fGpu->getContext()->createPath(this->path(), stroke));
- target->stencilPath(p, this->path().getFillType());
+ SkASSERT(!path.isInverseFillType());
+ SkAutoTUnref<GrPath> p(fGpu->getContext()->createPath(path, stroke));
+ target->stencilPath(p, path.getFillType());
}
-bool GrStencilAndCoverPathRenderer::onDrawPath(const SkStrokeRec& stroke,
+bool GrStencilAndCoverPathRenderer::onDrawPath(const SkPath& path,
+ const SkStrokeRec& stroke,
GrDrawTarget* target,
bool antiAlias) {
SkASSERT(!antiAlias);
@@ -65,9 +69,9 @@
GrDrawState* drawState = target->drawState();
SkASSERT(drawState->getStencil().isDisabled());
- SkAutoTUnref<GrPath> p(fGpu->getContext()->createPath(this->path(), stroke));
+ SkAutoTUnref<GrPath> p(fGpu->getContext()->createPath(path, stroke));
- if (this->path().isInverseFillType()) {
+ if (path.isInverseFillType()) {
GR_STATIC_CONST_SAME_STENCIL(kInvertedStencilPass,
kZero_StencilOp,
kZero_StencilOp,
@@ -92,7 +96,7 @@
*drawState->stencil() = kStencilPass;
}
- target->drawPath(p, this->path().getFillType());
+ target->drawPath(p, path.getFillType());
target->drawState()->stencil()->setDisabled();
return true;
« no previous file with comments | « src/gpu/GrStencilAndCoverPathRenderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698