aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontConfigInterface_direct.cpp
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-04-12 12:48:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-12 12:48:21 -0700
commit0586f5cc9713268238394411a5daa2c7758b092b (patch)
tree74d7c1a3786a306dab0dd3fdfe8e1bcb25f9f57f /src/ports/SkFontConfigInterface_direct.cpp
parent134ff5c9cf99e1a930cb1b77bf8fb2b7b2c31d31 (diff)
sRGB support for distance field text.
Add a second distance field adjust table that only applies contrast, not fake-gamma correction. Store a flag in the batch at creation time, using the same logic we apply elsewhere (render target format, plus paint flags). That gets us close, but not as good as bitmap text. The final step is to use a linear step function (rather than smoothstep) to map distance to coverage, when we have sRGB output. Smoothstep's nonlinear response is actually doing some fake-gamma, so it ends up over-correcting when the output is already gamma-correct. Results are now very close between L32 (old table, smoothstep) and S32 (contrast-only table, linstep). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885613002 Review URL: https://codereview.chromium.org/1885613002
Diffstat (limited to 'src/ports/SkFontConfigInterface_direct.cpp')
0 files changed, 0 insertions, 0 deletions