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

Issue 855513004: Tessellating GPU path renderer. (Closed)

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

Description

Tessellating GPU path renderer. This path renderer converts paths to linear contours, resolves intersections via Bentley-Ottman, implements a trapezoidal decomposition a la Fournier and Montuno to produce triangles, and renders those with a single draw call. It does not currently do antialiasing, so it must be used in conjunction with multisampling. A fair amount of the code is to handle floating point edge cases in intersections. Rather than perform exact computations (which would require arbitrary precision arithmetic), we reconnect the mesh to reflect the intersection points. For example, intersections can occur above the current vertex, and force edges to be merged into the current vertex, requiring a restart of the intersections. Splitting edges for intersections can also force them to merge with formerly-distinct edges in the same polygon, or to violate the ordering of the active edge list, or the active edge state of split edges. BUG=skia: Committed: https://skia.googlesource.com/skia/+/d6ed19cc751463285491a538bc7bf154cc7e6d8c

Patch Set 1 #

Total comments: 8

Patch Set 2 : Update to ToT; fix whitespace #

Patch Set 3 : Remove boundary code #

Patch Set 4 : More code removal #

Patch Set 5 : Convert Sample to a GM; fix unit test; add comments #

Patch Set 6 : Win32 fix #

Patch Set 7 : Rename headInY -> vertices #

Patch Set 8 : Rename prevInY -> prev. #

Patch Set 9 : Relax strictness of isRightOf() and isLeftOf(); add strictness checks where necessary #

Patch Set 10 : Fix formatting issue (initializers, 100-col issues) #

Patch Set 11 : Cleanup: make point comparison operators into one-liners #

Patch Set 12 : Add a compile-time option to do the line sweep in X instead of Y. #

Patch Set 13 : Fix copyrights #

Patch Set 14 : Clean up concavepaths GM code a bit. #

Patch Set 15 : Update to ToT #

Patch Set 16 : Update to ToT #

Patch Set 17 : Add a comment outlining the path rendering algorithm, and upate to ToT. #

Patch Set 18 : Fix typos in and clarity of comment #

Patch Set 19 : Update to ToT; remove kSkipTiled flag from GM #

Total comments: 14

Patch Set 20 : Update to ToT #

Patch Set 21 : Change wireframe mode from runtime to compile-time. #

Patch Set 22 : Move tess path renderer creation to GrAddPathRenderers #

Patch Set 23 : Fixes re: Greg's comments #

Patch Set 24 : Add missing SK_OVERRIDE; remove noise variables; make tess match other path renderers #

Patch Set 25 : Update to ToT #

Patch Set 26 : Fixes for fuzzer #

Total comments: 2

Patch Set 27 : Tessellate in source space (don't transform to device space) #

Patch Set 28 : Fixes per Greg's comments #

Patch Set 29 : Disable tessellating path renderer in path renderer chain (for now) #

Patch Set 30 : Actually disable the flag... #

Total comments: 28

Patch Set 31 : Changes per Jim's comments #

Patch Set 32 : Tweak comments #

Patch Set 33 : Fix typo #

Patch Set 34 : Update to ToT #

Patch Set 35 : Add an #ifndef guard around GR_TESSELLATING_PATH_RENDERING #define #

Patch Set 36 : Speculative ChromeOS build fix #

Total comments: 16

Patch Set 37 : Update to ToT #

Patch Set 38 : Fix brace formatting; replace overloaded operators w/functions. #

Patch Set 39 : More fixes re: review comments #

Patch Set 40 : Update to ToT #

Patch Set 41 : Fix inverse fill types (inverse transform clip rect) #

Total comments: 8

Patch Set 42 : Update to ToT (new getClip() API) #

Patch Set 43 : Fixes per review comments. #

Patch Set 44 : Update to ToT #

Total comments: 4

Patch Set 45 : Update to ToT #

Patch Set 46 : More fixes per review comments #

Patch Set 47 : Remove unit tests #

Patch Set 48 : Change ConcavePathTests unit test to directly exercise the tess path renderer #

Patch Set 49 : Rename ConcavePathTests -> TessellatingPathRendererTests; remove usused code #

Patch Set 50 : Remove useless #includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2219 lines, -0 lines) Patch
A gm/concavepaths.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +391 lines, -0 lines 0 comments Download
M gyp/gmslides.gypi 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 1 chunk +1 line, -0 lines 0 comments Download
M gyp/gpu.gypi 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 38 39 40 41 1 chunk +2 lines, -0 lines 0 comments Download
M gyp/tests.gypi 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 38 39 40 41 42 43 44 45 46 47 48 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrAddPathRenderers_default.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 3 chunks +8 lines, -0 lines 0 comments Download
A src/gpu/GrTessellatingPathRenderer.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 37 38 1 chunk +45 lines, -0 lines 0 comments Download
A src/gpu/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 38 39 40 41 42 43 44 45 1 chunk +1508 lines, -0 lines 0 comments Download
A tests/TessellatingPathRendererTests.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 38 39 40 41 42 43 44 45 46 47 48 49 1 chunk +263 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (7 generated)
Stephen White
Hi Brian, I'm sending this out for early comments. Known issues: - the way I'm ...
5 years, 11 months ago (2015-01-16 19:57:12 UTC) #2
bsalomon
https://codereview.chromium.org/855513004/diff/1/samplecode/SampleConcavePaths.cpp File samplecode/SampleConcavePaths.cpp (right): https://codereview.chromium.org/855513004/diff/1/samplecode/SampleConcavePaths.cpp#newcode139 samplecode/SampleConcavePaths.cpp:139: // Star test (self-intersecting) should we make this guy ...
5 years, 11 months ago (2015-01-20 15:12:24 UTC) #3
Stephen White
https://codereview.chromium.org/855513004/diff/1/samplecode/SampleConcavePaths.cpp File samplecode/SampleConcavePaths.cpp (right): https://codereview.chromium.org/855513004/diff/1/samplecode/SampleConcavePaths.cpp#newcode139 samplecode/SampleConcavePaths.cpp:139: // Star test (self-intersecting) On 2015/01/20 15:12:24, bsalomon wrote: ...
5 years, 11 months ago (2015-01-20 18:54:15 UTC) #4
Stephen White
Note that I've removed the (unused) boundary code in PS 3 & 4. This shaves ...
5 years, 11 months ago (2015-01-20 19:04:49 UTC) #5
bsalomon
Adding a few more people for review.
5 years, 11 months ago (2015-01-22 15:15:40 UTC) #8
Stephen White
I've added a descriptive comment outlining the path rendering algorithm. This patch is ready for ...
5 years, 11 months ago (2015-01-23 17:07:26 UTC) #9
jvanverth1
A few quick comments -- I'll take a deeper look tomorrow. https://codereview.chromium.org/855513004/diff/380001/src/gpu/GrPathRendererChain.cpp File src/gpu/GrPathRendererChain.cpp (right): ...
5 years, 11 months ago (2015-01-26 21:49:45 UTC) #10
Ken Russell (switch to Gerrit)
This is very exciting! There are relatively few highly robust tessellators in the open-source community ...
5 years, 11 months ago (2015-01-26 23:48:10 UTC) #12
egdaniel
first wave of comments. More to come https://codereview.chromium.org/855513004/diff/380001/src/gpu/GrTessellatingPathRenderer.cpp File src/gpu/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/855513004/diff/380001/src/gpu/GrTessellatingPathRenderer.cpp#newcode36 src/gpu/GrTessellatingPathRenderer.cpp:36: * not ...
5 years, 11 months ago (2015-01-27 15:03:43 UTC) #13
Stephen White
New patch up for Jim's comments. https://codereview.chromium.org/855513004/diff/380001/src/gpu/GrPathRendererChain.cpp File src/gpu/GrPathRendererChain.cpp (right): https://codereview.chromium.org/855513004/diff/380001/src/gpu/GrPathRendererChain.cpp#newcode82 src/gpu/GrPathRendererChain.cpp:82: this->addPathRenderer(SkNEW(GrTessellatingPathRenderer))->unref(); On 2015/01/26 ...
5 years, 11 months ago (2015-01-27 15:26:29 UTC) #14
Stephen White
Greg: thanks for your review. New patch up. https://codereview.chromium.org/855513004/diff/380001/src/gpu/GrTessellatingPathRenderer.cpp File src/gpu/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/855513004/diff/380001/src/gpu/GrTessellatingPathRenderer.cpp#newcode36 src/gpu/GrTessellatingPathRenderer.cpp:36: * ...
5 years, 11 months ago (2015-01-27 16:46:19 UTC) #15
Stephen White
Ping?
5 years, 10 months ago (2015-01-29 18:36:12 UTC) #16
egdaniel
Do you have any perf numbers for this compared to the default path renderer. The ...
5 years, 10 months ago (2015-01-29 19:31:19 UTC) #17
Stephen White
On 2015/01/29 19:31:19, egdaniel wrote: > Do you have any perf numbers for this compared ...
5 years, 10 months ago (2015-01-29 19:38:18 UTC) #18
Stephen White
https://codereview.chromium.org/855513004/diff/520001/src/gpu/GrTessellatingPathRenderer.cpp File src/gpu/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/855513004/diff/520001/src/gpu/GrTessellatingPathRenderer.cpp#newcode25 src/gpu/GrTessellatingPathRenderer.cpp:25: * 2) Sort the vertices in Y (and secondarily ...
5 years, 10 months ago (2015-01-29 19:38:29 UTC) #19
Stephen White
New patch up; PTAL.
5 years, 10 months ago (2015-01-29 22:28:49 UTC) #20
Stephen White
As discussed, I've left the code in, but disabled the flag that adds it to ...
5 years, 10 months ago (2015-01-30 18:07:52 UTC) #21
Stephen White
On 2015/01/30 18:07:52, Stephen White wrote: > As discussed, I've left the code in, but ...
5 years, 10 months ago (2015-01-30 18:12:50 UTC) #22
jvanverth1
I did another pass, but frankly it's rather hard to follow, so most of my ...
5 years, 10 months ago (2015-01-30 20:48:03 UTC) #24
Stephen White
Thanks for your review. https://codereview.chromium.org/855513004/diff/600001/src/gpu/GrPathUtils.cpp File src/gpu/GrPathUtils.cpp (right): https://codereview.chromium.org/855513004/diff/600001/src/gpu/GrPathUtils.cpp#newcode47 src/gpu/GrPathUtils.cpp:47: if (d <= tol || ...
5 years, 10 months ago (2015-01-30 21:36:47 UTC) #25
Stephen White
New patch up. PTAL.
5 years, 10 months ago (2015-01-30 21:38:41 UTC) #26
Stephen White
Updated to ToT. PTAL.
5 years, 10 months ago (2015-02-17 21:04:35 UTC) #27
reed1
https://codereview.chromium.org/855513004/diff/720001/src/gpu/GrTessellatingPathRenderer.cpp File src/gpu/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/855513004/diff/720001/src/gpu/GrTessellatingPathRenderer.cpp#newcode101 src/gpu/GrTessellatingPathRenderer.cpp:101: { nit: Skia places { on the same line ...
5 years, 10 months ago (2015-02-19 20:52:23 UTC) #28
Stephen White
THanks for your review! New patch up. https://codereview.chromium.org/855513004/diff/720001/src/gpu/GrTessellatingPathRenderer.cpp File src/gpu/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/855513004/diff/720001/src/gpu/GrTessellatingPathRenderer.cpp#newcode101 src/gpu/GrTessellatingPathRenderer.cpp:101: { On ...
5 years, 10 months ago (2015-02-20 21:58:41 UTC) #29
reed2
just some nits and comments. deferring the rest to the GPU team. https://codereview.chromium.org/855513004/diff/820001/src/gpu/GrPathUtils.cpp File src/gpu/GrPathUtils.cpp ...
5 years, 10 months ago (2015-02-24 16:30:02 UTC) #31
Stephen White
Thanks for your review. New patch up. https://codereview.chromium.org/855513004/diff/820001/src/gpu/GrPathUtils.cpp File src/gpu/GrPathUtils.cpp (right): https://codereview.chromium.org/855513004/diff/820001/src/gpu/GrPathUtils.cpp#newcode102 src/gpu/GrPathUtils.cpp:102: if (d ...
5 years, 10 months ago (2015-02-24 18:45:16 UTC) #32
egdaniel
https://codereview.chromium.org/855513004/diff/880001/src/gpu/GrTessellatingPathRenderer.cpp File src/gpu/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/855513004/diff/880001/src/gpu/GrTessellatingPathRenderer.cpp#newcode591 src/gpu/GrTessellatingPathRenderer.cpp:591: if (pointsLeft < 2 || (d1 < tolSqd && ...
5 years, 10 months ago (2015-02-25 15:46:10 UTC) #33
Stephen White
Thanks for your review. https://codereview.chromium.org/855513004/diff/880001/src/gpu/GrTessellatingPathRenderer.cpp File src/gpu/GrTessellatingPathRenderer.cpp (right): https://codereview.chromium.org/855513004/diff/880001/src/gpu/GrTessellatingPathRenderer.cpp#newcode591 src/gpu/GrTessellatingPathRenderer.cpp:591: if (pointsLeft < 2 || ...
5 years, 10 months ago (2015-02-25 16:37:23 UTC) #34
egdaniel
On 2015/02/25 16:37:23, Stephen White wrote: > Thanks for your review. > > https://codereview.chromium.org/855513004/diff/880001/src/gpu/GrTessellatingPathRenderer.cpp > ...
5 years, 10 months ago (2015-02-25 17:01:21 UTC) #35
egdaniel
lgtm, but anyone else can feel free to jump in
5 years, 10 months ago (2015-02-25 21:47:03 UTC) #36
bsalomon
On 2015/02/25 21:47:03, egdaniel wrote: > lgtm, but anyone else can feel free to jump ...
5 years, 10 months ago (2015-02-25 21:55:25 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/855513004/990001
5 years, 10 months ago (2015-02-26 14:53:02 UTC) #39
commit-bot: I haz the power
5 years, 10 months ago (2015-02-26 14:58:22 UTC) #40
Message was sent while issue was closed.
Committed patchset #50 (id:990001) as
https://skia.googlesource.com/skia/+/d6ed19cc751463285491a538bc7bf154cc7e6d8c

Powered by Google App Engine
This is Rietveld 408576698