Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Issue 1152733009: Screenspace AA tessellated path rendering. (Closed)

Created:
5 years, 6 months ago by Stephen White
Modified:
4 years, 3 months ago
Reviewers:
bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Screenspace AA tessellated GPU path rendering. This is an approach to antialiased concave path rendering on the GPU without using MSAA. It uses GrTessellator to extract boundary contours from the given path, then inflates by half a pixel in screen space each direction, then renders the result with zero alpha on the outer contour and one alpha on in the inner contour. This requires two passes through the tessellation code: one to extract the boundaries, then one to tessellate the result. This gives approximately a 3X improvement on the IE chalkboard demo in non-MSAA mode, a 30-40% improvement on MotionMark's "Fill Paths", and a ~3X improvement on MotionMark's "canvas arcTo segments". It works best for large, simple paths, so there's currently a limit of 10 verbs in the onCanDrawPath() check. This dovetails nicely with the distance field path renderer's support for small, detailed (and cached) paths. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1152733009 NOTRY=true Committed: https://skia.googlesource.com/skia/+/f57372daf0562a187c24d427366ac6d0cb980c9b

Patch Set 1 #

Patch Set 2 : Cleanup: remove fContour, remove edges as extracted. #

Patch Set 3 : First draft of boundary stroking #

Patch Set 4 : Update to ToT #

Patch Set 5 : Fix alpha, bevelling, add some debug code #

Patch Set 6 : Update to ToT (much API churn. so rebase.) #

Patch Set 7 : Update to ToT #

Patch Set 8 : Apply fill type during contour extraction, not tessellation. Update to ToT. #

Patch Set 9 : Update to ToT; separate AA & non-AA into separate functions #

Patch Set 10 : Round points to nearest 1/16th pixel. #

Patch Set 11 : Update to ToT #

Patch Set 12 : Restrict tessAA to below distance field, <= 10 verbs #

Patch Set 13 : Eliminate artifacts by simplifying boundary contours #

Patch Set 14 : #

Patch Set 15 : Many optimizations; update to ToT #

Patch Set 16 : Update to ToT #

Patch Set 17 : Only check for key in non-AA case (caching). #

Patch Set 18 : Update to ToT, fix for intruding edge vertex artifact #

Patch Set 19 : Fix shader bug; update to ToT #

Patch Set 20 : Fix inverse fill types; revert changes to concavepaths GM #

Patch Set 21 : Fix 100-col issues. #

Patch Set 22 : MSVC warning fixes #

Patch Set 23 : Add some missing "override"s. #

Patch Set 24 : More MSVC fixes. #

Patch Set 25 : Update to ToT #

Patch Set 26 : Move AA handling up to contours_to_polys(); mesh_to_polys() now just does non-AA. #

Patch Set 27 : Cleanup #

Patch Set 28 : Refactor alpha computation on intersection and intrustion. #

Patch Set 29 : Remove useless SkTMax template param (can be inferred). #

Patch Set 30 : Add #ifdef protection for AA tessellator. #

Patch Set 31 : Make stride part of the VertexAllocator. #

Total comments: 3

Patch Set 32 : Replace use of uint8_t* with void*. #

Patch Set 33 : Fix 100-col issue. #

Patch Set 34 : Reorder params to make more sense. Remove whitespace. #

Patch Set 35 : Fix 100-col issue. #

Patch Set 36 : Cleanup, and fix call to PathToTriangles(). #

Total comments: 11

Patch Set 37 : Cleanup, simplify getPath(), add comments. #

Total comments: 1

Patch Set 38 : Make GLPrograms test generate only simple fills. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+607 lines, -164 lines) Patch
M src/gpu/GrDefaultGeoProcFactory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 4 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/GrPathRendererChain.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -1 line 0 comments Download
M src/gpu/GrTessellator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 3 chunks +9 lines, -3 lines 0 comments Download
M src/gpu/GrTessellator.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 35 chunks +436 lines, -88 lines 0 comments Download
M src/gpu/batches/GrTessellatingPathRenderer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 13 chunks +157 lines, -68 lines 0 comments Download

Messages

Total messages: 70 (57 generated)
Stephen White
Brian: PTAL. Thanks! https://codereview.chromium.org/1152733009/diff/620001/src/gpu/GrDefaultGeoProcFactory.h File src/gpu/GrDefaultGeoProcFactory.h (right): https://codereview.chromium.org/1152733009/diff/620001/src/gpu/GrDefaultGeoProcFactory.h#newcode38 src/gpu/GrDefaultGeoProcFactory.h:38: float fCoverage; Note: I believe this ...
4 years, 3 months ago (2016-08-30 17:10:51 UTC) #33
bsalomon
https://codereview.chromium.org/1152733009/diff/620001/src/gpu/GrDefaultGeoProcFactory.h File src/gpu/GrDefaultGeoProcFactory.h (right): https://codereview.chromium.org/1152733009/diff/620001/src/gpu/GrDefaultGeoProcFactory.h#newcode38 src/gpu/GrDefaultGeoProcFactory.h:38: float fCoverage; On 2016/08/30 17:10:51, Stephen White wrote: > ...
4 years, 3 months ago (2016-08-31 14:19:19 UTC) #40
Stephen White
https://codereview.chromium.org/1152733009/diff/620001/src/gpu/GrDefaultGeoProcFactory.h File src/gpu/GrDefaultGeoProcFactory.h (right): https://codereview.chromium.org/1152733009/diff/620001/src/gpu/GrDefaultGeoProcFactory.h#newcode38 src/gpu/GrDefaultGeoProcFactory.h:38: float fCoverage; On 2016/08/31 14:19:19, bsalomon wrote: > On ...
4 years, 3 months ago (2016-08-31 15:16:38 UTC) #41
bsalomon
lgtm https://codereview.chromium.org/1152733009/diff/710001/src/gpu/batches/GrTessellatingPathRenderer.cpp File src/gpu/batches/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/1152733009/diff/710001/src/gpu/batches/GrTessellatingPathRenderer.cpp#newcode196 src/gpu/batches/GrTessellatingPathRenderer.cpp:196: SkPath path; On 2016/08/31 15:16:38, Stephen White wrote: ...
4 years, 3 months ago (2016-08-31 15:29:48 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1152733009/730001
4 years, 3 months ago (2016-08-31 15:41:00 UTC) #48
commit-bot: I haz the power
Committed patchset #37 (id:730001) as https://skia.googlesource.com/skia/+/9992bdef8ae97b3e5b109d278ccfab84c66bcbf0
4 years, 3 months ago (2016-08-31 15:42:05 UTC) #50
Stephen White
A revert of this CL (patchset #37 id:730001) has been created in https://codereview.chromium.org/2299683002/ by senorblanco@chromium.org. ...
4 years, 3 months ago (2016-08-31 16:31:23 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1152733009/750001
4 years, 3 months ago (2016-08-31 17:25:03 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot on master.client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot/builds/9500) Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot on master.client.skia.compile (JOB_FAILED, ...
4 years, 3 months ago (2016-08-31 17:25:53 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1152733009/750001
4 years, 3 months ago (2016-08-31 17:31:53 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot on master.client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot/builds/9504) Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot on master.client.skia.compile (JOB_FAILED, ...
4 years, 3 months ago (2016-08-31 17:32:43 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1152733009/750001
4 years, 3 months ago (2016-08-31 17:35:23 UTC) #68
commit-bot: I haz the power
4 years, 3 months ago (2016-08-31 17:36:24 UTC) #70
Message was sent while issue was closed.
Committed patchset #38 (id:750001) as
https://skia.googlesource.com/skia/+/f57372daf0562a187c24d427366ac6d0cb980c9b

Powered by Google App Engine
This is Rietveld 408576698