Remove clip from GrPipelineBuilder
This eliminates a copy and will allow us to make the GrClip class
virutal.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966903004
Review-Url: https://codereview.chromium.org/1966903004
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index 8b1319b..2072175 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -568,6 +568,7 @@
bool GrMSAAPathRenderer::internalDrawPath(GrDrawTarget* target,
GrPipelineBuilder* pipelineBuilder,
+ const GrClip& clip,
GrColor color,
const SkMatrix& viewMatrix,
const SkPath& path,
@@ -676,7 +677,7 @@
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(color, viewM, bounds, nullptr,
&localMatrix));
- target->drawBatch(*pipelineBuilder, batch);
+ target->drawBatch(*pipelineBuilder, clip, batch);
} else {
if (passCount > 1) {
pipelineBuilder->setDisableColorXPFactory();
@@ -690,7 +691,7 @@
SkAutoTUnref<MSAAPathBatch> batch(MSAAPathBatch::Create(geometry, viewMatrix,
devBounds));
if (batch->isValid()) {
- target->drawBatch(*pipelineBuilder, batch);
+ target->drawBatch(*pipelineBuilder, clip, batch);
}
else {
return false;
@@ -728,6 +729,7 @@
}
return this->internalDrawPath(args.fTarget,
args.fPipelineBuilder,
+ *args.fClip,
args.fColor,
*args.fViewMatrix,
*path,
@@ -738,8 +740,8 @@
GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),"GrMSAAPathRenderer::onStencilPath");
SkASSERT(SkPath::kInverseEvenOdd_FillType != args.fPath->getFillType());
SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType());
- this->internalDrawPath(args.fTarget, args.fPipelineBuilder, GrColor_WHITE, *args.fViewMatrix,
- *args.fPath, true);
+ this->internalDrawPath(args.fTarget, args.fPipelineBuilder, *args.fClip, GrColor_WHITE,
+ *args.fViewMatrix, *args.fPath, true);
}
///////////////////////////////////////////////////////////////////////////////////////////////////