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

Unified Diff: src/gpu/GrStencilAndCoverPathRenderer.cpp

Issue 23440049: Implement stroking a path with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 2 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/GrPath.h ('k') | src/gpu/gl/GrGLPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverPathRenderer.cpp
diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp
index ef3b953861639e47e35327cbd822017d583f94d8..0271b22a9aab8f0a9cf6ebc4f932b8d27f932e5c 100644
--- a/src/gpu/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp
@@ -38,7 +38,7 @@ bool GrStencilAndCoverPathRenderer::canDrawPath(const SkPath& path,
const SkStrokeRec& stroke,
const GrDrawTarget* target,
bool antiAlias) const {
- return stroke.isFillStyle() &&
+ return !stroke.isHairlineStyle() &&
!antiAlias && // doesn't do per-path AA, relies on the target having MSAA
NULL != target->getDrawState().getRenderTarget()->getStencilBuffer() &&
target->getDrawState().getStencil().isDisabled();
@@ -55,8 +55,8 @@ void GrStencilAndCoverPathRenderer::onStencilPath(const SkPath& path,
const SkStrokeRec& stroke,
GrDrawTarget* target) {
SkASSERT(!path.isInverseFillType());
- SkAutoTUnref<GrPath> p(fGpu->createPath(path));
- target->stencilPath(p, stroke, path.getFillType());
+ SkAutoTUnref<GrPath> p(fGpu->createPath(path, stroke));
+ target->stencilPath(p, path.getFillType());
}
bool GrStencilAndCoverPathRenderer::onDrawPath(const SkPath& path,
@@ -69,7 +69,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const SkPath& path,
GrDrawState* drawState = target->drawState();
SkASSERT(drawState->getStencil().isDisabled());
- SkAutoTUnref<GrPath> p(fGpu->createPath(path));
+ SkAutoTUnref<GrPath> p(fGpu->createPath(path, stroke));
if (path.isInverseFillType()) {
GR_STATIC_CONST_SAME_STENCIL(kInvertedStencilPass,
@@ -96,7 +96,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const SkPath& path,
*drawState->stencil() = kStencilPass;
}
- target->fillPath(p, stroke, path.getFillType());
+ target->drawPath(p, path.getFillType());
target->drawState()->stencil()->setDisabled();
return true;
« no previous file with comments | « src/gpu/GrPath.h ('k') | src/gpu/gl/GrGLPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698