| Index: src/core/SkDistanceFieldGen.cpp
|
| diff --git a/src/core/SkDistanceFieldGen.cpp b/src/core/SkDistanceFieldGen.cpp
|
| index 30354e09f83cb783c49ee018af74b3d8e236b272..c147151c3b21def3fcef267e30b972b86593152c 100755
|
| --- a/src/core/SkDistanceFieldGen.cpp
|
| +++ b/src/core/SkDistanceFieldGen.cpp
|
| @@ -107,6 +107,9 @@ 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;
|
| @@ -143,6 +146,7 @@ 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) {
|
|
|