aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrMSAAPathRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/batches/GrMSAAPathRenderer.cpp')
-rw-r--r--src/gpu/batches/GrMSAAPathRenderer.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index 930f7f926a..f073db0a28 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -562,7 +562,6 @@ private:
bool GrMSAAPathRenderer::internalDrawPath(GrRenderTargetContext* renderTargetContext,
const GrPaint& paint,
- GrAAType aaType,
const GrUserStencilSettings& userStencilSettings,
const GrClip& clip,
const SkMatrix& viewMatrix,
@@ -663,7 +662,7 @@ bool GrMSAAPathRenderer::internalDrawPath(GrRenderTargetContext* renderTargetCon
GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM, bounds, nullptr,
&localMatrix));
- GrPipelineBuilder pipelineBuilder(paint, aaType);
+ GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
pipelineBuilder.setUserStencil(passes[p]);
renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
@@ -674,11 +673,12 @@ bool GrMSAAPathRenderer::internalDrawPath(GrRenderTargetContext* renderTargetCon
return false;
}
- GrPipelineBuilder pipelineBuilder(paint, aaType);
+ GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
pipelineBuilder.setUserStencil(passes[p]);
if (passCount > 1) {
pipelineBuilder.setDisableColorXPFactory();
}
+
renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
}
}
@@ -689,7 +689,7 @@ bool GrMSAAPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
// 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() && (GrAAType::kCoverage != args.fAAType);
+ return args.fShape->style().isSimpleFill() && !args.fAntiAlias;
}
bool GrMSAAPathRenderer::onDrawPath(const DrawPathArgs& args) {
@@ -704,7 +704,6 @@ bool GrMSAAPathRenderer::onDrawPath(const DrawPathArgs& args) {
}
return this->internalDrawPath(args.fRenderTargetContext,
*args.fPaint,
- args.fAAType,
*args.fUserStencilSettings,
*args.fClip,
*args.fViewMatrix,
@@ -720,10 +719,10 @@ void GrMSAAPathRenderer::onStencilPath(const StencilPathArgs& args) {
GrPaint paint;
paint.setXPFactory(GrDisableColorXPFactory::Make());
+ paint.setAntiAlias(args.fIsAA);
- this->internalDrawPath(args.fRenderTargetContext, paint, args.fAAType,
- GrUserStencilSettings::kUnused, *args.fClip, *args.fViewMatrix,
- *args.fShape, true);
+ this->internalDrawPath(args.fRenderTargetContext, paint, GrUserStencilSettings::kUnused,
+ *args.fClip, *args.fViewMatrix, *args.fShape, true);
}
///////////////////////////////////////////////////////////////////////////////////////////////////