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

Unified Diff: src/gpu/batches/GrStencilAndCoverPathRenderer.cpp

Issue 1966903004: Remove clip from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@fix2_nvpr
Patch Set: Created 4 years, 7 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/batches/GrStencilAndCoverPathRenderer.cpp
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
index af0c397da61a096dbf1babd243829781309a90b6..78ca31aeab90189b50c6d0289da667cc2f84304e 100644
--- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
@@ -69,7 +69,8 @@ void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) {
"GrStencilAndCoverPathRenderer::onStencilPath");
SkASSERT(!args.fPath->isInverseFillType());
SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, GrStyle::SimpleFill()));
- args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fViewMatrix, p, p->getFillType());
+ args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fClip, *args.fViewMatrix, p,
+ p->getFillType());
}
bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
@@ -107,7 +108,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
pipelineBuilder->setUserStencil(&kInvertedCoverPass);
// fake inverse with a stencil and cover
- args.fTarget->stencilPath(*pipelineBuilder, viewMatrix, p, p->getFillType());
+ args.fTarget->stencilPath(*pipelineBuilder, *args.fClip, viewMatrix, p, p->getFillType());
SkMatrix invert = SkMatrix::I();
SkRect bounds =
@@ -134,7 +135,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(args.fColor, viewM, bounds, nullptr,
&invert));
- args.fTarget->drawBatch(*pipelineBuilder, batch);
+ args.fTarget->drawBatch(*pipelineBuilder, *args.fClip, batch);
} else {
static constexpr GrUserStencilSettings kCoverPass(
GrUserStencilSettings::StaticInit<
@@ -149,7 +150,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
pipelineBuilder->setUserStencil(&kCoverPass);
SkAutoTUnref<GrDrawBatch> batch(
GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType(), p));
- args.fTarget->drawBatch(*pipelineBuilder, batch);
+ args.fTarget->drawBatch(*pipelineBuilder, *args.fClip, batch);
}
pipelineBuilder->disableUserStencil();

Powered by Google App Engine
This is Rietveld 408576698