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

Unified Diff: src/core/SkDistanceFieldGen.h

Issue 239333002: Fix artifacts in distance field rendering due to bilerp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDistanceFieldGen.h
diff --git a/src/core/SkDistanceFieldGen.h b/src/core/SkDistanceFieldGen.h
index 756cff14a3be2fd38778578dd48ee5c2d9b62e12..0510907f8c8847ec319f4c8fd037d39720542f6f 100644
--- a/src/core/SkDistanceFieldGen.h
+++ b/src/core/SkDistanceFieldGen.h
@@ -14,8 +14,9 @@
#define SK_DistanceFieldMagnitude 4
// we need to pad around the original glyph to allow our maximum distance of
// SK_DistanceFieldMagnitude texels away from any edge
-// we add one to this pad to allow for bilerp
-#define SK_DistanceFieldPad (SK_DistanceFieldMagnitude+1)
+#define SK_DistanceFieldPad 4
+// the rect we render with is inset from the distance field glyph size to allow for bilerp
+#define SK_DistanceFieldInset 2
// for the fragment shader
// The distance field is constructed as unsigned char values, so that the zero value is at 128,
« no previous file with comments | « no previous file | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698