Distance field fixes for Android
- Expand glyph size by 2 on each side to compensate for bilerp lookup
- Correct for Adreno tendency to drop entire tile if any pixel has divide-by-0
- Fix blurriness on Adreno by using uv coords to compute gradient instead
of st coords
- Add faster version for uniform scale
BUG=skia:2173
Committed: http://code.google.com/p/skia/source/detail?r=13955
R=bsalomon@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/205343008
git-svn-id: http://skia.googlecode.com/svn/trunk@13958 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 1a422c6..4ce336b 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -81,10 +81,10 @@
GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kBilerp_FilterMode);
// This effect could be stored with one of the cache objects (atlas?)
- SkISize size = fStrike->getAtlasSize();
drawState->addCoverageEffect(
- GrDistanceFieldTextureEffect::Create(fCurrTexture, params, size),
- kGlyphCoordsAttributeIndex)->unref();
+ GrDistanceFieldTextureEffect::Create(fCurrTexture, params,
+ fContext->getMatrix().isSimilarity()),
+ kGlyphCoordsAttributeIndex)->unref();
if (!GrPixelConfigIsAlphaOnly(fCurrTexture->config())) {
if (kOne_GrBlendCoeff != fPaint.getSrcBlendCoeff() ||