From 9f549358b3ac9f61e78b194e39d6ac6eb322e35e Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 8 Dec 2016 10:35:19 -0500 Subject: 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 Reviewed-by: Robert Phillips --- tools/gpu/GrTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/gpu/GrTest.cpp') diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index 8ab4c9be22..43277736c1 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -160,7 +160,7 @@ void SkGpuDevice::drawTexture(GrTexture* tex, const SkRect& dst, const SkPaint& grPaint.addColorTextureProcessor(tex, nullptr, textureMat); - fRenderTargetContext->drawRect(GrNoClip(), grPaint, mat, dst); + fRenderTargetContext->drawRect(GrNoClip(), grPaint, GrAA::kNo, mat, dst); } @@ -244,6 +244,7 @@ void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newT #define RETURN_IF_ABANDONED if (fRenderTargetContext->fDrawingManager->wasAbandoned()) { return; } void GrRenderTargetContextPriv::testingOnly_drawBatch(const GrPaint& paint, + GrAAType aaType, GrDrawOp* batch, const GrUserStencilSettings* uss, bool snapToCenters) { @@ -253,7 +254,7 @@ void GrRenderTargetContextPriv::testingOnly_drawBatch(const GrPaint& paint, GR_AUDIT_TRAIL_AUTO_FRAME(fRenderTargetContext->fAuditTrail, "GrRenderTargetContext::testingOnly_drawBatch"); - GrPipelineBuilder pipelineBuilder(paint, fRenderTargetContext->mustUseHWAA(paint)); + GrPipelineBuilder pipelineBuilder(paint, aaType); if (uss) { pipelineBuilder.setUserStencil(uss); } -- cgit v1.2.3