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

Issue 2221103002: Analytic AntiAlias for Convex Shapes (Closed)

Created:
4 years, 4 months ago by liyuqian
Modified:
4 years, 2 months ago
Reviewers:
caryclark, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Implement AnalyticAA for convex shapes. Design doc: go/analyticAA A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown. To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html The most significant changes are in convexpaths and analytic_antialias_convex BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221103002 Committed: https://skia.googlesource.com/skia/+/7795822807478143120c33228b68d2ab3918af2c

Patch Set 1 #

Patch Set 2 : Fix more issues #

Patch Set 3 : Add SkAnalyticCubicEdge #

Patch Set 4 : Make alpha computation cleaner and faster #

Total comments: 34

Patch Set 5 : Mask #

Patch Set 6 : Fix alpha computation #

Total comments: 26

Patch Set 7 : Big revision #

Patch Set 8 : Reapply y snapping #

Patch Set 9 : Add override so android compiler won't complain #

Patch Set 10 : Separate SkAnalyticEdge.h #

Total comments: 4

Patch Set 11 : Simplify gm #

Total comments: 1

Patch Set 12 : Merge the GM CL #

Patch Set 13 : Change comma to semicolon to avoid compile warning #

Patch Set 14 : Try fixing constexpr error in MSVC #

Patch Set 15 : Declare flag in SkCommonFlags.h for iOS build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2136 lines, -49 lines) Patch
M bench/nanobench.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -0 lines 0 comments Download
M dm/DM.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -0 lines 0 comments Download
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M samplecode/SampleApp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -0 lines 0 comments Download
A src/core/SkAAAConstants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +220 lines, -0 lines 0 comments Download
A src/core/SkAnalyticEdge.h View 1 2 3 4 5 6 7 8 9 1 chunk +154 lines, -0 lines 0 comments Download
A src/core/SkAnalyticEdge.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +245 lines, -0 lines 0 comments Download
M src/core/SkBlitter.cpp View 1 2 12 1 chunk +9 lines, -4 lines 0 comments Download
M src/core/SkEdge.h View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -1 line 0 comments Download
M src/core/SkEdge.cpp View 1 2 3 4 5 6 4 chunks +16 lines, -3 lines 0 comments Download
M src/core/SkEdgeBuilder.h View 4 chunks +13 lines, -5 lines 0 comments Download
M src/core/SkEdgeBuilder.cpp View 1 2 3 4 5 6 7 8 9 8 chunks +149 lines, -36 lines 0 comments Download
M src/core/SkScan.h View 1 2 3 4 3 chunks +22 lines, -0 lines 0 comments Download
A src/core/SkScan_AAAPath.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1279 lines, -0 lines 0 comments Download
M src/core/SkScan_AntiPath.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M tools/flags/SkCommonFlags.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M tools/flags/SkCommonFlags.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (21 generated)
liyuqian
Hi Mike and Cary, having both convex and concave shapes' change in one CL might ...
4 years, 4 months ago (2016-08-08 19:41:02 UTC) #4
caryclark
https://codereview.chromium.org/2221103002/diff/60001/src/core/SkAntiRun.h File src/core/SkAntiRun.h (right): https://codereview.chromium.org/2221103002/diff/60001/src/core/SkAntiRun.h#newcode82 src/core/SkAntiRun.h:82: alpha[0] = SkToU8(SkTMin<int>(0xFF, alpha[0] + maxValue)); In what case ...
4 years, 4 months ago (2016-08-10 13:08:10 UTC) #7
liyuqian
Hi Mike and Cary, I couldn't help to try to further accelerate my program during ...
4 years, 4 months ago (2016-08-16 13:22:06 UTC) #11
liyuqian
Any updated comments?
4 years, 4 months ago (2016-08-18 19:06:08 UTC) #12
caryclark
On 2016/08/18 19:06:08, liyuqian wrote: > Any updated comments? Not from me. lgtm
4 years, 4 months ago (2016-08-18 19:26:20 UTC) #13
reed1
https://codereview.chromium.org/2221103002/diff/100001/include/private/SkFixed.h File include/private/SkFixed.h (right): https://codereview.chromium.org/2221103002/diff/100001/include/private/SkFixed.h#newcode91 include/private/SkFixed.h:91: inline SkFixed SkFixedMul_lowprec(SkFixed a, SkFixed b) { is this ...
4 years, 4 months ago (2016-08-18 20:31:01 UTC) #14
liyuqian
Revised according to Mike's comments. See the detailed responses below. https://codereview.chromium.org/2221103002/diff/100001/include/private/SkFixed.h File include/private/SkFixed.h (right): https://codereview.chromium.org/2221103002/diff/100001/include/private/SkFixed.h#newcode91 ...
4 years, 4 months ago (2016-08-22 15:30:48 UTC) #15
reed1
ok, lets dig into this thing :) Can you create a separate header for the ...
4 years, 2 months ago (2016-10-03 13:44:21 UTC) #17
liyuqian
On 2016/10/03 13:44:21, reed1 wrote: > ok, lets dig into this thing :) > > ...
4 years, 2 months ago (2016-10-03 14:54:00 UTC) #18
reed1
do we want the new GMs, other than to trigger the global switch for the ...
4 years, 2 months ago (2016-10-03 17:33:35 UTC) #19
liyuqian
On 2016/10/03 17:33:35, reed1 wrote: > do we want the new GMs, other than to ...
4 years, 2 months ago (2016-10-03 17:55:02 UTC) #20
liyuqian
Responses for the comments. https://codereview.chromium.org/2221103002/diff/180001/src/core/SkBlitter.cpp File src/core/SkBlitter.cpp (right): https://codereview.chromium.org/2221103002/diff/180001/src/core/SkBlitter.cpp#newcode79 src/core/SkBlitter.cpp:79: if (leftAlpha > 0) { ...
4 years, 2 months ago (2016-10-03 17:55:42 UTC) #21
liyuqian
I simplified gm/aaa.cpp to make it less confusing. Currently, we do not set the fUseAnalyticAA ...
4 years, 2 months ago (2016-10-03 18:03:36 UTC) #22
reed1
https://codereview.chromium.org/2221103002/diff/200001/gm/aaa.cpp File gm/aaa.cpp (right): https://codereview.chromium.org/2221103002/diff/200001/gm/aaa.cpp#newcode49 gm/aaa.cpp:49: canvas->drawRectCoords(20, 20, 20.2, 200, p); nit: you'll get warnings ...
4 years, 2 months ago (2016-10-03 19:02:28 UTC) #23
liyuqian
Hi Mike, I've rebased the CL so the GM changes are now gone.
4 years, 2 months ago (2016-10-04 13:54:57 UTC) #24
reed1
Is the effect of the CL as is, that nothing changes unless we wack the ...
4 years, 2 months ago (2016-10-04 15:04:20 UTC) #25
liyuqian
On 2016/10/04 15:04:20, reed1 wrote: > Is the effect of the CL as is, that ...
4 years, 2 months ago (2016-10-04 15:32:26 UTC) #29
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/2221103002/220001
4 years, 2 months ago (2016-10-04 15:32:42 UTC) #32
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/2221103002/240001
4 years, 2 months ago (2016-10-04 15:51:42 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86-Debug-Trybot on master.client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86-Debug-Trybot/builds/12122)
4 years, 2 months ago (2016-10-04 15:56:33 UTC) #38
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/2221103002/260001
4 years, 2 months ago (2016-10-04 16:05:55 UTC) #41
commit-bot: I haz the power
Committed patchset #14 (id:260001) as https://skia.googlesource.com/skia/+/7795822807478143120c33228b68d2ab3918af2c
4 years, 2 months ago (2016-10-04 16:29:54 UTC) #43
stephana
4 years, 2 months ago (2016-10-04 16:55:46 UTC) #44
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:260001) has been created in
https://codereview.chromium.org/2388213003/ by stephana@google.com.

The reason for reverting is: Breaks iOS build. .

Powered by Google App Engine
This is Rietveld 408576698