History log of /external/skia/src/core/SkAnalyticEdge.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
42102420c02a525f57264c124ef941882d22c5a1 16-Jul-2017 Mike Klein <mtklein@google.com> Revert "Inject a dsb into SkAnalyticEdge::setLine() to work around ARMv7 CPU erratum."

This reverts commit 101806f4526d0ba5d48515c82a28dbf6956aca4d.

Reason for revert: no more need.

BUG=chromium:740805

Original change's description:
> Inject a dsb into SkAnalyticEdge::setLine() to work around ARMv7 CPU erratum.
>
> BUG=chromium:710131
>
> Change-Id: I4568bc24cc8fabb6f9df3b7645b01a98e11791b8
> Reviewed-on: https://skia-review.googlesource.com/14062
> Reviewed-by: Doug Anderson <dianders@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

TBR=mtklein@chromium.org,dianders@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:710131
Change-Id: Ib5b58a951ae56e0f0523cfed27754e0cd150e6ce
Reviewed-on: https://skia-review.googlesource.com/23840
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
/external/skia/src/core/SkAnalyticEdge.h
101806f4526d0ba5d48515c82a28dbf6956aca4d 21-Apr-2017 Mike Klein <mtklein@chromium.org> Inject a dsb into SkAnalyticEdge::setLine() to work around ARMv7 CPU erratum.

BUG=chromium:710131

Change-Id: I4568bc24cc8fabb6f9df3b7645b01a98e11791b8
Reviewed-on: https://skia-review.googlesource.com/14062
Reviewed-by: Doug Anderson <dianders@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/src/core/SkAnalyticEdge.h
8de05ffcb26c757a6169e217ef46105286811dd9 06-Mar-2017 Yuqian Li <liyuqian@google.com> Remove SK_SUPPORT_LEGACY_AAA flag as chromium now turns it off

BUG=skia:

Change-Id: I3b385b8aeab08f402f4471637bf641cd456c8c56
Reviewed-on: https://skia-review.googlesource.com/9327
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
6987b00fae08ef0731042bb341b4e002a2da72c2 19-Jan-2017 Yuqian Li <liyuqian@google.com> Fix performance issue and compute intersections more often.

(This CL also turned on Analytic AA for concave paths by removing SK_SUPPORT_LEGACY_AAA flag.)

Performance:
The SK_ALWAYS_INLINE was restored because it could bring 30%-50% speedup
in certain convex cases (e.g., fill_big_triangle). We also have to
reduce the number of branchings in the concave code path to enable such
speedup. (Although the speedup is for convex cases. The assembly code is
so strange...)

Intersection:
Previously, the criterion is too loose and that caused some bad pixels
(mostly unnoticeable by human eyes without magnifying). For example,
pixel (198, 222) of
https://gold.skia.org/detail?test=parsedpaths&digest=979e81de6f7b3f9e7e8dc810e31cad8d


BUG=skia:

Change-Id: I5e8191865c3df625f895cd4588c67c283fcbeaec
Reviewed-on: https://skia-review.googlesource.com/7318
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
ce7e18f548cf8af0bc7c3950824221c5c08e1e25 18-Jan-2017 Yuqian Li <liyuqian@google.com> Reject horizontal edges in FDot6 precision

This simplifies the slope computation because we don't have to check dy
!= 0.

BUG=skia:

Change-Id: I5c09a9217ceed65f81f9d82cb045e33a70218077
Reviewed-on: https://skia-review.googlesource.com/7180
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
/external/skia/src/core/SkAnalyticEdge.h
874a8725860cd2dc860967ee8069316d95de607c 18-Jan-2017 Yuqian Li <liyuqian@google.com> Revert concave AAA

BUG=skia:6131
TBR=reed@google.com,caryclark@google.com

Change-Id: Ib580a4fb9023f43518a3d89cd70bf2589ad02bb6
Reviewed-on: https://skia-review.googlesource.com/7200
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
98cf99b3ae4cc956158d1fd843fc8a84059ae132 17-Jan-2017 Yuqian Li <liyuqian@google.com> Turn on concave analytic AA

This will allow Skia trybots to exercise analytic AA. But there's still
a guard flag in Chromium that prevents layout tests failure.

Additionally, we
1. fixed nagative shift problem
2. relax the ASSERT when slope is too large: If slope is large, the accuracy of the slope is limited due
to conversion to SkFDot6 and division. Hence we have to relax the constraint.
3. handle the special case where dx != 0 while slope == 0 because of very large dy and limited precision.

BUG=skia:

Change-Id: Ice70164f3f396f0db3896bedc7b96fbd613078dc
Reviewed-on: https://skia-review.googlesource.com/7120
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
197bde9c606dbd22eafa02509bf4ea3ce7a0c69b 14-Jan-2017 Mike Reed <reed@google.com> Revert "Exercise concave analytic AA"

This reverts commit 480a1c6a1643ccbe959fa849fb91df6d86d51ec3.

Reason for revert: <INSERT REASONING HERE>

2.32m done 8888 skp http___www_yespornplease_com.skp
2.32m start 8888 skp http___www_freepostcodelottery_com.skp
2.32m done 8888 skp http___www_pingwest_com.skp
2.32m start 8888 skp http___www_fbdown_net.skp
../../../../../work/skia/src/core/SkAnalyticEdge.cpp:116: fatal error: "assert(slope == SK_MaxS32 || SkAbs32(fSnappedX + SkFixedMul(slope, newSnappedY - fSnappedY) - newSnappedX) < SK_FixedHalf)"


../../../src/core/SkScan_AAAPath.cpp:746:61: runtime error: left shift of negative value -1
#0 0x30c120a in blit_aaa_trapezoid_row(AdditiveBlitter*, int, int, int, int, int, int, int, unsigned char, unsigned char*, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30c120a)
#1 0x30bc557 in aaa_walk_edges(SkAnalyticEdge*, SkAnalyticEdge*, SkPath::FillType, AdditiveBlitter*, int, int, int, int, bool, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30bc557)
#2 0x30aed31 in aaa_fill_path(SkPath const&, SkIRect const&, AdditiveBlitter*, int, int, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30aed31)
#3 0x30addc5 in SkScan::AAAFillPath(SkPath const&, SkRegion const&, SkBlitter*, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30addc5)
#4 0x30af56d in SkScan::AAAFillPath(SkPath const&, SkRasterClip const&, SkBlitter*) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30af56d)
#5 0x30dc96b in SkScan::AntiFillPath(SkPath const&, SkRasterClip const&, SkBlitter*) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30dc96b)


Original change's description:
> Exercise concave analytic AA
>
> This will allow Skia trybots (e.g., 1M skp) to exercise analytic AA.
> There's still a guard flag in Chromium that prevents layout tests failure.
>
> TBR=reed@google.com,caryclark@google.com
>
> BUG=skia:
>
> Change-Id: Ie893c10d34bf969e013ef047c1bbf4b004d584cc
> Reviewed-on: https://skia-review.googlesource.com/7091
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
>

TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I9b621f2d0cd143b37a2570a10471d2ad8cb149fd
Reviewed-on: https://skia-review.googlesource.com/7092
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/core/SkAnalyticEdge.h
480a1c6a1643ccbe959fa849fb91df6d86d51ec3 14-Jan-2017 Yuqian Li <liyuqian@google.com> Exercise concave analytic AA

This will allow Skia trybots (e.g., 1M skp) to exercise analytic AA.
There's still a guard flag in Chromium that prevents layout tests failure.

TBR=reed@google.com,caryclark@google.com

BUG=skia:

Change-Id: Ie893c10d34bf969e013ef047c1bbf4b004d584cc
Reviewed-on: https://skia-review.googlesource.com/7091
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
550148ba572acc75e73d3c7d600ea7fa43db55f2 13-Jan-2017 Yuqian Li <liyuqian@google.com> Reland https://skia-review.googlesource.com/c/6091/

The only difference is that we now also put the guard flag
SK_SUPPORT_LEGACY_AAA in SkUserConfig.h. Previously, SkAnalyticEdge.cpp doesn't
get that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I134bb76cebd6fffa712f438076668765321bba3b
Reviewed-on: https://skia-review.googlesource.com/6992
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
aeef5610d7a3fe4a53fc27b20486da79bf7a949a 13-Jan-2017 Yuqian Li <liyuqian@google.com> Revert "Reland https://skia-review.googlesource.com/c/6091/"

This reverts commit b46fff60bc82fe6f0c64b2241d854a121f7cb5f9.

Reason for revert: possible chromium cc unit tests failure

Change-Id: Ie174c55e4d0fc3ae45854b5897ba26b7ad5a9c13
Reviewed-on: https://skia-review.googlesource.com/6981
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
b46fff60bc82fe6f0c64b2241d854a121f7cb5f9 12-Jan-2017 Yuqian Li <liyuqian@google.com> Reland https://skia-review.googlesource.com/c/6091/

The only difference is that we now put the guard flag SK_SUPPORT_LEGACY_AAA in
SkUserConfig.h instead of SkScan.h. Previously, SkAnalyticEdge.cpp doesn't get
that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I7b89d3cb64ad71715101d2a5e8e77be3a8a6fa16
Reviewed-on: https://skia-review.googlesource.com/6972
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
90ee03b0d1778f37448dfd82d1f5cfbbec9f798f 12-Jan-2017 Yuqian Li <liyuqian@google.com> Revert "Implement Analytic AA for General Paths (with Guard against Chrome)"

This reverts commit 89a0e72287e991cfa2f860f92fad545ca59defe1.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Implement Analytic AA for General Paths (with Guard against Chrome)
>
> I've set up a SK_SUPPORT_LEGACY_AAA flag to guard against Chromium layout tests. I also set that flag in this CL so theoretically this CL won't trigger any GM changes. I'll use this to verify my guard, and remove that flag and actually enables concave AAA in a future CL.
>
> When enabled, for most simple concave paths (e.g., rectangle stroke, rrect stroke, sawtooth, stars...), the Analytic AA achieves 1.3x-2x speedup, and they look much prettier. And they probably are the majority in our use cases by number. But they probably are not the majority by time cost; a single complicated path may cost 10x-100x more time to render than a rectangle stroke... For those complicated paths, we fall back to supersampling by default as we're likely to be 1.1-1.2x slower and the quality improvement is not visually significant. However, one can use gSkForceAnalyticAA to disable that fallback.
>
> BUG=skia:
>
> Change-Id: If9549a3acc4a187cfaf7eb51890c148da3083d31
> Reviewed-on: https://skia-review.googlesource.com/6091
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
>

TBR=caryclark@google.com,liyuqian@google.com,reed@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I13c05aaa1bcb14956bd0fe01bb404e41be75af22
Reviewed-on: https://skia-review.googlesource.com/6961
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
89a0e72287e991cfa2f860f92fad545ca59defe1 11-Jan-2017 Yuqian Li <liyuqian@google.com> Implement Analytic AA for General Paths (with Guard against Chrome)

I've set up a SK_SUPPORT_LEGACY_AAA flag to guard against Chromium layout tests. I also set that flag in this CL so theoretically this CL won't trigger any GM changes. I'll use this to verify my guard, and remove that flag and actually enables concave AAA in a future CL.

When enabled, for most simple concave paths (e.g., rectangle stroke, rrect stroke, sawtooth, stars...), the Analytic AA achieves 1.3x-2x speedup, and they look much prettier. And they probably are the majority in our use cases by number. But they probably are not the majority by time cost; a single complicated path may cost 10x-100x more time to render than a rectangle stroke... For those complicated paths, we fall back to supersampling by default as we're likely to be 1.1-1.2x slower and the quality improvement is not visually significant. However, one can use gSkForceAnalyticAA to disable that fallback.

BUG=skia:

Change-Id: If9549a3acc4a187cfaf7eb51890c148da3083d31
Reviewed-on: https://skia-review.googlesource.com/6091
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
4eb35bb7d72d0e87f1546e822909929e1eef12bb 17-Nov-2016 Yuqian Li <liyuqian@google.com> Use SkFixedMul instead of SkFixedMul_lowprec

It seems that SkFixedMul_lowprec doesn't have too much performance gain (maybe
1%). But its precision loss is siginificant. No serious issues have been found
in convex cases, but things get much trickier for concave shapes. I'm removing
it now to improve the stability and reliability of our algorithm, which may
potentially benefit our Chrome landing. (Even if we do not remove
SkFixedMul_lowprec now, we eventually will remove it when we land concave AAA
code.)

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4926

Change-Id: Iae5739a3780bb77ce6237888eee51a502fea5cf2
Reviewed-on: https://skia-review.googlesource.com/4926
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/src/core/SkAnalyticEdge.h
20079a94e82fd7345dfb119a8777e5ba482a041c 16-Nov-2016 Yuqian Li <liyuqian@google.com> Fix mask overflow caused by edge drift

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4797

Change-Id: Ica1568b67c1e1ce4aae2bdaba2c5b1f2155d1382
Reviewed-on: https://skia-review.googlesource.com/4797
Reviewed-by: Cary Clark <caryclark@google.com>
/external/skia/src/core/SkAnalyticEdge.h
2add0ffdaab4c33ca6702c81533c88c7b5ca7294 20-Oct-2016 liyuqian <liyuqian@google.com> Use Analytic AA in SkAAClip.

This will fix some Chrome ref tests.

The main issue here is that the SkAAClip requires: (1) we blit in order, and (2) we must forceRLE.

Note that this still depends on the global gSkUseAnalyticAA to turn on the Analytic AA.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2430343003

Review-Url: https://chromiumcodereview.appspot.com/2430343003
/external/skia/src/core/SkAnalyticEdge.h
38911a7cb53474575e1cd1cb545902b50ee00889 04-Oct-2016 liyuqian <liyuqian@google.com> Resubmit issue 2221103002 to fix the iOS build by declaring the flag in
SkCommonFlags.h

TBR=reed@google.com,caryclark@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2393643002

Review-Url: https://codereview.chromium.org/2393643002
/external/skia/src/core/SkAnalyticEdge.h
d36baa7a4a5ae3cc94cc4a45379f55658f80c0a6 04-Oct-2016 stephana <stephana@google.com> Revert of Analytic AntiAlias for Convex Shapes (patchset #14 id:260001 of https://codereview.chromium.org/2221103002/ )

Reason for revert:
Breaks iOS build.

Original issue's 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

TBR=reed@google.com,caryclark@google.com,liyuqian@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2388213003
/external/skia/src/core/SkAnalyticEdge.h
7795822807478143120c33228b68d2ab3918af2c 04-Oct-2016 liyuqian <liyuqian@google.com> 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

Review-Url: https://codereview.chromium.org/2221103002
/external/skia/src/core/SkAnalyticEdge.h