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

Unified Diff: src/gpu/GrStencilAndCoverPathRenderer.cpp

Issue 791743003: Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: more windows fix Created 6 years 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/GrProcessor.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('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 e7c4fc889924f4204fcb29226104cc97777fbc82..d8470f3c8c328befcceafd1224cbcda3fc956bcf 100644
--- a/src/gpu/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp
@@ -85,8 +85,9 @@ void GrStencilAndCoverPathRenderer::onStencilPath(GrDrawTarget* target,
const SkPath& path,
const SkStrokeRec& stroke) {
SkASSERT(!path.isInverseFillType());
+ SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(GrColor_WHITE));
SkAutoTUnref<GrPath> p(get_gr_path(fGpu, path, stroke));
- target->stencilPath(drawState, p, convert_skpath_filltype(path.getFillType()));
+ target->stencilPath(drawState, pp, p, convert_skpath_filltype(path.getFillType()));
}
bool GrStencilAndCoverPathRenderer::onDrawPath(GrDrawTarget* target,
@@ -117,7 +118,8 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(GrDrawTarget* target,
drawState->setStencil(kInvertedStencilPass);
// fake inverse with a stencil and cover
- target->stencilPath(drawState, p, convert_skpath_filltype(path.getFillType()));
+ SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(GrColor_WHITE));
+ target->stencilPath(drawState, pp, p, convert_skpath_filltype(path.getFillType()));
GrDrawState::AutoViewMatrixRestore avmr;
SkRect bounds = SkRect::MakeLTRB(0, 0,
@@ -145,7 +147,8 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(GrDrawTarget* target,
0xffff);
drawState->setStencil(kStencilPass);
- target->drawPath(drawState, color, p, convert_skpath_filltype(path.getFillType()));
+ SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(color));
+ target->drawPath(drawState, pp, p, convert_skpath_filltype(path.getFillType()));
}
drawState->stencil()->setDisabled();
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698