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

Unified Diff: src/core/SkDistanceFieldGen.cpp

Issue 1603953005: Revert of sdf: use linear edge distance approximation for all gradient directions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDistanceFieldGen.cpp
diff --git a/src/core/SkDistanceFieldGen.cpp b/src/core/SkDistanceFieldGen.cpp
index c147151c3b21def3fcef267e30b972b86593152c..30354e09f83cb783c49ee018af74b3d8e236b272 100755
--- a/src/core/SkDistanceFieldGen.cpp
+++ b/src/core/SkDistanceFieldGen.cpp
@@ -107,9 +107,6 @@
// 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 @@
}
return distance;
-#endif
}
static void init_distances(DFData* data, unsigned char* edges, int width, int height) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698