Fix artifacts in distance field rendering due to bilerp
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 15 Apr 2014 17:53:21 +0000 (17:53 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 15 Apr 2014 17:53:21 +0000 (17:53 +0000)
commit64b08a1026851a84031713f0e12a3e59d55ce808
treedf26732c34ec830af5e9260ab712c7d2982ee319
parent51b0d0bc5c82f257dca244c864702c66d84100a2
Fix artifacts in distance field rendering due to bilerp

Because we were using the full distance field glyph rect, there were cases
when a neighboring texel might be set to full value (e.g. we might copy the
glyph over old data after a purge). This was giving artifacts, and insetting
the rect by 1 solves the problem. In doing this, I discovered that removing the
extra 1 texel pad around the glyph meant to handle bilerp, and insetting by 2,
works just as well and saves space in the glyph atlas.

R=bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/239333002

git-svn-id: http://skia.googlecode.com/svn/trunk@14203 2bbb7eff-a529-9590-31e7-b0007b416f81
src/core/SkDistanceFieldGen.h
src/gpu/GrDistanceFieldTextContext.cpp