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
This commit is contained in:
mtklein 2016-01-19 16:26:55 -08:00 committed by Commit bot
parent 4020665b81
commit 31d59e71cf

View File

@ -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) {