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

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: Created 7 years, 3 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
Index: src/gpu/GrStencilAndCoverPathRenderer.cpp
diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp
index e745a2212c7ee3cb43ae1e1f26d0c68ce9c6ae26..1b016837c3238d9d3a9104100c5ff7d0e2905070 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
!target->getDrawState().willEffectReadDstColor() && // not supported yet
NULL != target->getDrawState().getRenderTarget()->getStencilBuffer() &&
@@ -56,7 +56,7 @@ void GrStencilAndCoverPathRenderer::onStencilPath(const SkPath& path,
const SkStrokeRec& stroke,
GrDrawTarget* target) {
SkASSERT(!path.isInverseFillType());
- SkAutoTUnref<GrPath> p(fGpu->createPath(path));
+ SkAutoTUnref<GrPath> p(fGpu->createPath(path, stroke));
target->stencilPath(p, stroke, path.getFillType());
}
@@ -70,7 +70,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,
@@ -97,7 +97,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const SkPath& path,
*drawState->stencil() = kStencilPass;
}
- target->fillPath(p, stroke, path.getFillType());
+ target->drawPath(p, stroke, path.getFillType());
target->drawState()->stencil()->setDisabled();
return true;
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGLPath.h » ('j') | src/gpu/gl/GrGLPath.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698