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

Unified Diff: src/gpu/GrTextStrike.cpp

Issue 212953008: Revert of Distance field fixes for Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/gpu/GrTextStrike.h ('k') | src/gpu/effects/GrDistanceFieldTextureEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextStrike.cpp
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
index 7084b9383da6829f10ad3e712128f3fbedaadf89..0a1fd1e71f765f8476d73cae4503a2745ffb9f81 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -181,11 +181,7 @@
GrTexture* texture = fAtlasMgr[i]->getTexture();
if (NULL != texture) {
SkString filename;
-#ifdef SK_BUILD_FOR_ANDROID
- filename.printf("/sdcard/fontcache_%d%d.png", gDumpCount, i);
-#else
filename.printf("fontcache_%d%d.png", gDumpCount, i);
-#endif
texture->savePixels(filename.c_str());
}
}
@@ -252,13 +248,11 @@
GrGlyph* glyph = fPool.alloc();
// expand bounds to hold full distance field data
- // + room for bilerp
- int pad = DISTANCE_FIELD_RANGE+1;
if (fUseDistanceField) {
- bounds.fLeft -= pad;
- bounds.fRight += pad;
- bounds.fTop -= pad;
- bounds.fBottom += pad;
+ bounds.fLeft -= DISTANCE_FIELD_RANGE;
+ bounds.fRight += DISTANCE_FIELD_RANGE;
+ bounds.fTop -= DISTANCE_FIELD_RANGE;
+ bounds.fBottom += DISTANCE_FIELD_RANGE;
}
glyph->init(packed, bounds);
fCache.insert(packed, glyph);
@@ -298,9 +292,8 @@
// but must shrink back down to get the packed glyph data
int dfWidth = glyph->width();
int dfHeight = glyph->height();
- int pad = DISTANCE_FIELD_RANGE+1;
- int width = dfWidth - 2*pad;
- int height = dfHeight - 2*pad;
+ int width = dfWidth - 2*DISTANCE_FIELD_RANGE;
+ int height = dfHeight - 2*DISTANCE_FIELD_RANGE;
int stride = width*bytesPerPixel;
size_t size = width * height * bytesPerPixel;
« no previous file with comments | « src/gpu/GrTextStrike.h ('k') | src/gpu/effects/GrDistanceFieldTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698