diff options
author | 2016-06-08 09:32:54 -0700 | |
---|---|---|
committer | 2016-06-08 09:32:54 -0700 | |
commit | 7942f22c607caf826a6a609b89338a569d0a30e7 (patch) | |
tree | 99552c5a41f749bfeaed86c190caf7c711bd014e /src/gpu | |
parent | 2f64bf7931368c4ad8c18c8516fe92d14795916d (diff) |
Fix instances where hwaa was wrong for mixed samples
Fixes a bug with coverage-AA hairlines where hwaa was unintentionally
enabled for mixed samples, and a bug with path stenciling where hwaa
was unintentionally disabled for mixed samples.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043203004
Review-Url: https://codereview.chromium.org/2043203004
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/batches/GrAAHairLinePathRenderer.cpp | 3 | ||||
-rw-r--r-- | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp index 750c1f1304..2faf1afa14 100644 --- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp @@ -972,8 +972,7 @@ bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) { SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fColor, *args.fViewMatrix, *args.fPath, *args.fStyle, devClipBounds)); - GrPipelineBuilder pipelineBuilder(*args.fPaint, - args.fDrawContext->isStencilBufferMultisampled()); + GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->isUnifiedMultisampled()); pipelineBuilder.setUserStencil(args.fUserStencilSettings); args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp index 296343da7a..1e6675a9a1 100644 --- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp @@ -69,12 +69,14 @@ static GrPath* get_gr_path(GrResourceProvider* resourceProvider, const SkPath& s void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) { GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), "GrStencilAndCoverPathRenderer::onStencilPath"); + SkASSERT(!args.fIsAA || args.fDrawContext->isStencilBufferMultisampled()); GrPaint paint; SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create())); paint.setAntiAlias(args.fIsAA); - const GrPipelineBuilder pipelineBuilder(paint, args.fDrawContext->isUnifiedMultisampled()); + GrPipelineBuilder pipelineBuilder(paint, args.fDrawContext->isUnifiedMultisampled()); + pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, args.fIsAA); SkASSERT(!args.fPath->isInverseFillType()); SkAutoTUnref<GrPath> path(get_gr_path(fResourceProvider, *args.fPath, GrStyle::SimpleFill())); |