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

Unified Diff: src/core/SkDistanceFieldGen.cpp

Issue 205343008: Distance field fixes for Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix int->float conversion issues Created 6 years, 9 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/GrAtlas.h » ('j') | 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 43e92ba8fa10a6bebf31231f760d03471e7c3243..a829fd47410fa93381f8f02c92183a7a46df9f90 100755
--- a/src/core/SkDistanceFieldGen.cpp
+++ b/src/core/SkDistanceFieldGen.cpp
@@ -336,10 +336,10 @@ bool SkGenerateDistanceFieldFromImage(unsigned char* distanceField,
SkASSERT(NULL != image);
// the final distance field will have additional texels on each side to handle
- // the maximum distance
+ // the maximum distance + 1 for bilerp
// we expand our temp data by one more on each side to simplify
// the scanning code -- will always be treated as infinitely far away
- int pad = distanceMagnitude+1;
+ int pad = distanceMagnitude+2;
// set params for distance field data
int dataWidth = width + 2*pad;
« no previous file with comments | « no previous file | src/gpu/GrAtlas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698