diff options
author | 2015-06-18 13:46:45 -0700 | |
---|---|---|
committer | 2015-06-18 13:46:46 -0700 | |
commit | 932d413e69845989fadaecf5bcb8686ec8c05032 (patch) | |
tree | f27e49d559c8576b730059332c1924154b4d248d /src/gpu/GrAtlasTextContext.cpp | |
parent | 7ab04d949bae5e3ad1a5788b0497fc6ea1d86440 (diff) |
Switch to glyphs as paths at a higher point size on Android
The regression occurred when we dropped the maximum DF size from 192
to 162, which meant that any glyph > 324 ended up being rendered as paths
rather than the previous > 384. This pushes the threshold for
rendering paths up to 384. Quality looks fine on high-res devices
which is why this is restricted to Android-only (low-res Android devices
should only rarely have text that large).
BUG=chromium:467569
Review URL: https://codereview.chromium.org/1183053005
Diffstat (limited to 'src/gpu/GrAtlasTextContext.cpp')
-rw-r--r-- | src/gpu/GrAtlasTextContext.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp index 900d681b50..3acf3bf127 100644 --- a/src/gpu/GrAtlasTextContext.cpp +++ b/src/gpu/GrAtlasTextContext.cpp @@ -55,7 +55,11 @@ static const int kSmallDFFontLimit = 32; static const int kMediumDFFontSize = 72; static const int kMediumDFFontLimit = 72; static const int kLargeDFFontSize = 162; +#ifdef SK_BUILD_FOR_ANDROID +static const int kLargeDFFontLimit = 2 * 192; +#else static const int kLargeDFFontLimit = 2 * kLargeDFFontSize; +#endif SkDEBUGCODE(static const int kExpectedDistanceAdjustTableSize = 8;) static const int kDistanceAdjustLumShift = 5; @@ -2096,6 +2100,11 @@ GrAtlasTextContext::createBatch(BitmapTextBlob* cacheBlob, const PerSubRunInfo& } bool useBGR = SkPixelGeometryIsBGR(fDeviceProperties.pixelGeometry()); float gamma = fDeviceProperties.gamma(); +#ifdef DEBUG_SHOW_DF_TEXT + // force all DF text to show up in red + filteredColor = 0xff0000ff; + subrunColor = GrColorPackRGBA(0xff, 0x00, 0x00, 0xff); +#endif batch = BitmapTextBatch::Create(format, glyphCount, fContext->getBatchFontCache(), fDistanceAdjustTable, filteredColor, info.fUseLCDText, useBGR, |