diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-08 10:35:19 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-08 16:27:44 +0000 |
commit | 9f549358b3ac9f61e78b194e39d6ac6eb322e35e (patch) | |
tree | 870b370b9985b1863abf4b1df0cce6d6f6ad5ac5 /src/gpu/GrRenderTargetContextPriv.h | |
parent | 978ccebd8af61417ecdb6d45a31cc68657eee752 (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/GrRenderTargetContextPriv.h')
-rw-r--r-- | src/gpu/GrRenderTargetContextPriv.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gpu/GrRenderTargetContextPriv.h b/src/gpu/GrRenderTargetContextPriv.h index ff17505972..b232ed1087 100644 --- a/src/gpu/GrRenderTargetContextPriv.h +++ b/src/gpu/GrRenderTargetContextPriv.h @@ -53,28 +53,33 @@ public: void stencilRect(const GrClip& clip, const GrUserStencilSettings* ss, - bool useHWAA, + GrAAType, const SkMatrix& viewMatrix, const SkRect& rect); - void stencilPath(const GrClip&, - bool useHWAA, - const SkMatrix& viewMatrix, - const GrPath*); + void stencilPath(const GrClip&, GrAAType, const SkMatrix& viewMatrix, const GrPath*); + /** + * Draws a rect, either AA or not, and touches the stencil buffer with the user stencil settings + * for each color sample written. + */ bool drawAndStencilRect(const GrClip&, const GrUserStencilSettings*, SkRegion::Op op, bool invert, - bool doAA, + GrAA, const SkMatrix& viewMatrix, const SkRect&); + /** + * Draws a path, either AA or not, and touches the stencil buffer with the user stencil settings + * for each color sample written. + */ bool drawAndStencilPath(const GrClip&, const GrUserStencilSettings*, SkRegion::Op op, bool invert, - bool doAA, + GrAA, const SkMatrix& viewMatrix, const SkPath&); @@ -91,6 +96,7 @@ public: } void testingOnly_drawBatch(const GrPaint&, + GrAAType, GrDrawOp* batch, const GrUserStencilSettings* = nullptr, bool snapToCenters = false); |