aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrTessellatingPathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-12-08 10:35:19 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-08 16:27:44 +0000
commit9f549358b3ac9f61e78b194e39d6ac6eb322e35e (patch)
tree870b370b9985b1863abf4b1df0cce6d6f6ad5ac5 /src/gpu/batches/GrTessellatingPathRenderer.cpp
parent978ccebd8af61417ecdb6d45a31cc68657eee752 (diff)
Remove antialiasing control from GrPaint.
This adds an additional param (of new enum type GrAA) to draws that can antialias and a new enum GrAAType to indicate the AA technique (none, fragment shader computed coverage, msaa). Some GMs change due to this: 1) In some places we weren't disabling MSAA when the draw was supposed to be unantialiased. 2) Some bounding rect draws that use GrFragmentProcessors were unnecessarily turning on antialiasing, by disabling it a very small number of pixel LSBs change. Change-Id: I7d8d8793dda70bcd373d09055beb9949c1a8a4d0 Reviewed-on: https://skia-review.googlesource.com/5608 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/batches/GrTessellatingPathRenderer.cpp')
-rw-r--r--src/gpu/batches/GrTessellatingPathRenderer.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 86cf88392c..3fa92c680f 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -140,7 +140,7 @@ bool GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) cons
if (!args.fShape->style().isSimpleFill() || args.fShape->knownToBeConvex()) {
return false;
}
- if (args.fAntiAlias) {
+ if (GrAAType::kCoverage == args.fAAType) {
#ifdef SK_DISABLE_SCREENSPACE_TESS_AA_PATH_RENDERER
return false;
#else
@@ -364,14 +364,10 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
*args.fShape,
*args.fViewMatrix,
clipBoundsI,
- args.fAntiAlias));
-
- GrPipelineBuilder pipelineBuilder(*args.fPaint,
- args.fRenderTargetContext->mustUseHWAA(*args.fPaint));
+ GrAAType::kCoverage == args.fAAType));
+ GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fAAType);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
-
args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
-
return true;
}