diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-08 16:57:38 +0000 |
---|---|---|
committer | Brian Salomon <bsalomon@google.com> | 2016-12-08 17:11:46 +0000 |
commit | 419d81eed4a010e6080db199795117cbedf9e6e4 (patch) | |
tree | 7e11b85514db3fe6c7c7f43f8c07d2839eda7bed /src/gpu/GrPathRenderer.h | |
parent | a92c383e2f1ceb0323aef79fa444450e6a3e1c03 (diff) |
Revert "Remove antialiasing control from GrPaint."
This reverts commit 9f549358b3ac9f61e78b194e39d6ac6eb322e35e.
Reason for revert: hitting asserts
Change-Id: I542d34edc05ecf72b7646263f25736a0950c78e7
Reviewed-on: https://skia-review.googlesource.com/5707
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPathRenderer.h')
-rw-r--r-- | src/gpu/GrPathRenderer.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h index 4e1a96619c..2b5ccdc883 100644 --- a/src/gpu/GrPathRenderer.h +++ b/src/gpu/GrPathRenderer.h @@ -78,16 +78,17 @@ public: * fPipelineBuilder The pipelineBuilder * fViewMatrix The viewMatrix * fShape The shape to draw - * fAntiAlias The type of anti aliasing required. + * fAntiAlias True if anti-aliasing is required. */ struct CanDrawPathArgs { const GrShaderCaps* fShaderCaps; const SkMatrix* fViewMatrix; const GrShape* fShape; - GrAAType fAAType; + bool fAntiAlias; // These next two are only used by GrStencilAndCoverPathRenderer bool fHasUserStencilSettings; + bool fIsStencilBufferMSAA; #ifdef SK_DEBUG void validate() const { @@ -120,7 +121,7 @@ public: * fColor Color to render with * fViewMatrix The viewMatrix * fShape The shape to draw - * fAAtype true if anti-aliasing is required. + * fAntiAlias true if anti-aliasing is required. * fGammaCorrect true if gamma-correct rendering is to be used. */ struct DrawPathArgs { @@ -132,7 +133,7 @@ public: const GrClip* fClip; const SkMatrix* fViewMatrix; const GrShape* fShape; - GrAAType fAAType; + bool fAntiAlias; bool fGammaCorrect; #ifdef SK_DEBUG void validate() const { @@ -158,13 +159,10 @@ public: canArgs.fShaderCaps = args.fResourceProvider->caps()->shaderCaps(); canArgs.fViewMatrix = args.fViewMatrix; canArgs.fShape = args.fShape; - canArgs.fAAType = args.fAAType; + canArgs.fAntiAlias = args.fAntiAlias; canArgs.fHasUserStencilSettings = !args.fUserStencilSettings->isUnused(); - SkASSERT(!(canArgs.fAAType == GrAAType::kHW && - !args.fRenderTargetContext->isStencilBufferMultisampled())); - SkASSERT(!(canArgs.fAAType == GrAAType::kCoverage && - args.fRenderTargetContext->isStencilBufferMultisampled())); + canArgs.fIsStencilBufferMSAA = args.fRenderTargetContext->isStencilBufferMultisampled(); SkASSERT(this->canDrawPath(canArgs)); if (!args.fUserStencilSettings->isUnused()) { SkPath path; @@ -182,14 +180,14 @@ public: * fRenderTargetContext The target of the draws * fViewMatrix Matrix applied to the path. * fPath The path to draw. - * fAAType The type of AA, cannot be kCoverage. + * fIsAA Is the path to be drawn AA (only set when MSAA is available) */ struct StencilPathArgs { GrResourceProvider* fResourceProvider; GrRenderTargetContext* fRenderTargetContext; const GrClip* fClip; const SkMatrix* fViewMatrix; - GrAAType fAAType; + bool fIsAA; const GrShape* fShape; #ifdef SK_DEBUG @@ -199,7 +197,6 @@ public: SkASSERT(fViewMatrix); SkASSERT(fShape); SkASSERT(fShape->style().isSimpleFill()); - SkASSERT(GrAAType::kCoverage != fAAType); SkPath path; fShape->asPath(&path); SkASSERT(!path.isInverseFillType()); @@ -286,7 +283,7 @@ private: drawArgs.fRenderTargetContext = args.fRenderTargetContext; drawArgs.fViewMatrix = args.fViewMatrix; drawArgs.fShape = args.fShape; - drawArgs.fAAType = args.fAAType; + drawArgs.fAntiAlias = false; // In this case the MSAA handles the AA so we want to draw BW drawArgs.fGammaCorrect = false; this->drawPath(drawArgs); } |