Relandx2 "Remove antialiasing control from GrPaint."
Fixes a bad merge.
This reverts commit 073285c0595d46205d1482cc19af2d7d891bfeae.
Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a
Reviewed-on: https://skia-review.googlesource.com/5774
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index f073db0..930f7f9 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -562,6 +562,7 @@
bool GrMSAAPathRenderer::internalDrawPath(GrRenderTargetContext* renderTargetContext,
const GrPaint& paint,
+ GrAAType aaType,
const GrUserStencilSettings& userStencilSettings,
const GrClip& clip,
const SkMatrix& viewMatrix,
@@ -662,7 +663,7 @@
GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM, bounds, nullptr,
&localMatrix));
- GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
+ GrPipelineBuilder pipelineBuilder(paint, aaType);
pipelineBuilder.setUserStencil(passes[p]);
renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
@@ -673,12 +674,11 @@
return false;
}
- GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
+ GrPipelineBuilder pipelineBuilder(paint, aaType);
pipelineBuilder.setUserStencil(passes[p]);
if (passCount > 1) {
pipelineBuilder.setDisableColorXPFactory();
}
-
renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
}
}
@@ -689,7 +689,7 @@
// This path renderer only fills and relies on MSAA for antialiasing. Stroked shapes are
// handled by passing on the original shape and letting the caller compute the stroked shape
// which will have a fill style.
- return args.fShape->style().isSimpleFill() && !args.fAntiAlias;
+ return args.fShape->style().isSimpleFill() && (GrAAType::kCoverage != args.fAAType);
}
bool GrMSAAPathRenderer::onDrawPath(const DrawPathArgs& args) {
@@ -704,6 +704,7 @@
}
return this->internalDrawPath(args.fRenderTargetContext,
*args.fPaint,
+ args.fAAType,
*args.fUserStencilSettings,
*args.fClip,
*args.fViewMatrix,
@@ -719,10 +720,10 @@
GrPaint paint;
paint.setXPFactory(GrDisableColorXPFactory::Make());
- paint.setAntiAlias(args.fIsAA);
- this->internalDrawPath(args.fRenderTargetContext, paint, GrUserStencilSettings::kUnused,
- *args.fClip, *args.fViewMatrix, *args.fShape, true);
+ this->internalDrawPath(args.fRenderTargetContext, paint, args.fAAType,
+ GrUserStencilSettings::kUnused, *args.fClip, *args.fViewMatrix,
+ *args.fShape, true);
}
///////////////////////////////////////////////////////////////////////////////////////////////////