aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrAtlasTextContext.cpp
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-05-01 11:57:56 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-01 21:12:15 +0000
commitc86c5c0144b85d0bc8ec791f9609ee2d4e7d835a (patch)
treedc0e00ea79487ce08f90fca2b4408b525271b82c /src/gpu/text/GrAtlasTextContext.cpp
parent0f91bb874dc3201dbc3cce3b946f66e3e484c6fc (diff)
Remove devKerning
Dev kerning is not supported by any scalers. This is mostly removed. The remaining fields fRsbDelta and fLsbDelta are kept to keep Android compiling. Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 Reviewed-on: https://skia-review.googlesource.com/124921 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/gpu/text/GrAtlasTextContext.cpp')
-rw-r--r--src/gpu/text/GrAtlasTextContext.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp
index 27c8dea670..e99d9df044 100644
--- a/src/gpu/text/GrAtlasTextContext.cpp
+++ b/src/gpu/text/GrAtlasTextContext.cpp
@@ -498,7 +498,6 @@ void GrAtlasTextContext::DrawBmpPosTextAsPaths(GrAtlasTextBlob* blob, int runInd
pathPaint.setPathEffect(nullptr);
SkPaint::GlyphCacheProc glyphCacheProc = SkPaint::GetGlyphCacheProc(pathPaint.getTextEncoding(),
- pathPaint.isDevKernText(),
true);
auto cache = SkStrikeCache::FindOrCreateStrikeExclusive(
pathPaint, &props, SkScalerContextFlags::kFakeGammaAndBoostContrast, nullptr);
@@ -679,7 +678,7 @@ void GrAtlasTextContext::drawDFText(GrAtlasTextBlob* blob, int runIndex,
const SkPaint& skPaint = paint.skPaint();
SkPaint::GlyphCacheProc glyphCacheProc =
- SkPaint::GetGlyphCacheProc(skPaint.getTextEncoding(), skPaint.isDevKernText(), true);
+ SkPaint::GetGlyphCacheProc(skPaint.getTextEncoding(), true);
SkTArray<SkScalar> positions;
@@ -705,14 +704,13 @@ void GrAtlasTextContext::drawDFText(GrAtlasTextBlob* blob, int runIndex,
auto origPaintCache =
SkStrikeCache::FindOrCreateStrikeExclusive(*desc.getDesc(), effects, *typeface);
- SkAutoKern autokern;
const char* stop = text + byteLength;
while (textPtr < stop) {
// don't need x, y here, since all subpixel variants will have the
// same advance
const SkGlyph& glyph = glyphCacheProc(origPaintCache.get(), &textPtr);
- SkScalar width = SkFloatToScalar(glyph.fAdvanceX) + autokern.adjust(glyph);
+ SkScalar width = SkFloatToScalar(glyph.fAdvanceX);
positions.push_back(stopX + origin * width);
SkScalar height = SkFloatToScalar(glyph.fAdvanceY);
@@ -777,7 +775,7 @@ void GrAtlasTextContext::drawDFPosText(GrAtlasTextBlob* blob, int runIndex,
auto cache = blob->setupCache(runIndex, props, SkScalerContextFlags::kNone, dfPaint,
nullptr);
SkPaint::GlyphCacheProc glyphCacheProc =
- SkPaint::GetGlyphCacheProc(dfPaint.getTextEncoding(), dfPaint.isDevKernText(), true);
+ SkPaint::GetGlyphCacheProc(dfPaint.getTextEncoding(), true);
const char* stop = text + byteLength;
@@ -884,8 +882,7 @@ void GrAtlasTextContext::FallbackTextHelper::drawText(GrAtlasTextBlob* blob, int
SkExclusiveStrikePtr cache;
const SkPaint& skPaint = paint.skPaint();
SkPaint::GlyphCacheProc glyphCacheProc =
- SkPaint::GetGlyphCacheProc(skPaint.getTextEncoding(),
- skPaint.isDevKernText(), true);
+ SkPaint::GetGlyphCacheProc(skPaint.getTextEncoding(), true);
SkColor textColor = paint.filteredPremulColor();
SkScalar textRatio = SK_Scalar1;
if (fUseScaledFallback) {