From 0e3c55431b463b5575983c0c875909e08a3562bf Mon Sep 17 00:00:00 2001 From: brianosman Date: Wed, 13 Apr 2016 13:56:21 -0700 Subject: Tweak distance field path renderer behavior in gamma-correct mode to match recent changes to text rendering. Uses linear coverage falloff. Produces results that are perceptually more similar to L32 (raster and gpu). Smoothstep + sRGB was too soft. Plumb the gamma-correctness via DrawPathArgs, which also paves the way for other path rendering implementations to easily make decisions about rendering technique based on that flag. Fix a few typos and formatting issues from my most recent change. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889453002 Review URL: https://codereview.chromium.org/1889453002 --- gm/surface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gm/surface.cpp') diff --git a/gm/surface.cpp b/gm/surface.cpp index 503b887f1f..6b79479492 100644 --- a/gm/surface.cpp +++ b/gm/surface.cpp @@ -80,7 +80,7 @@ protected: const SkImageInfo info = SkImageInfo::MakeN32(W, H, kOpaque_SkAlphaType, canvas->imageInfo().profileType()); SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType); - bool gammaCorrrect = canvas->getProps(&canvasProps) && canvasProps.isGammaCorrect(); + bool gammaCorrect = canvas->getProps(&canvasProps) && canvasProps.isGammaCorrect(); const struct { SkPixelGeometry fGeo; @@ -99,7 +99,7 @@ protected: SkScalar y = 0; for (size_t i = 0; i < SK_ARRAY_COUNT(rec); ++i) { auto surface(make_surface(ctx, info, rec[i].fGeo, disallowAA, disallowDither, - gammaCorrrect)); + gammaCorrect)); test_draw(surface->getCanvas(), rec[i].fLabel); surface->draw(canvas, x, y, nullptr); y += H; -- cgit v1.2.3