diff options
author | mtklein <mtklein@google.com> | 2016-01-19 16:26:55 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-19 16:26:55 -0800 |
commit | 31d59e71cf5a571ff903d64ba2a6f17b715bfcfb (patch) | |
tree | 7f420da605bc1c3e4cb8d4caab67dbb00e623b62 /src | |
parent | 4020665b81e0ff58b317c685056faa071b823b5a (diff) |
Revert of sdf: use linear edge distance approximation for all gradient directions (patchset #1 id:1 of https://codereview.chromium.org/1545893003/ )
Reason for revert:
breaks roll?
https://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/81753
Original issue's description:
> sdf: use linear edge distance approximation for all gradient directions
>
> Image diff tools tell me there are diffs, but I sure can't see them.
> This drops edge_distance() off the chart as far as CPU cost goes.
>
> BUG=skia:4729
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1545893003
>
> Committed: https://skia.googlesource.com/skia/+/8a87bb4d5c23da83ef406ef87b470afa4217d7a4
TBR=jvanverth@google.com,bsalomon@google.com,reed@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4729
Review URL: https://codereview.chromium.org/1603953005
Diffstat (limited to 'src')
-rwxr-xr-x | src/core/SkDistanceFieldGen.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/core/SkDistanceFieldGen.cpp b/src/core/SkDistanceFieldGen.cpp index f1ebfa558a..147aefad79 100755 --- a/src/core/SkDistanceFieldGen.cpp +++ b/src/core/SkDistanceFieldGen.cpp @@ -107,9 +107,6 @@ static void init_glyph_data(DFData* data, unsigned char* edges, const unsigned c // computes the distance to an edge given an edge normal vector and a pixel's alpha value // assumes that direction has been pre-normalized static float edge_distance(const SkPoint& direction, float alpha) { -#if 1 // formula (1) - return 0.5f - alpha; -#else // formula (4) float dx = direction.fX; float dy = direction.fY; float distance; @@ -146,7 +143,6 @@ static float edge_distance(const SkPoint& direction, float alpha) { } return distance; -#endif } static void init_distances(DFData* data, unsigned char* edges, int width, int height) { |