Calculate inverse scale for distance field text in vertex shader
authorjvanverth <jvanverth@google.com>
Mon, 6 Apr 2015 18:38:52 +0000 (11:38 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 6 Apr 2015 18:38:52 +0000 (11:38 -0700)
commit5b143038cb47763974d2750ed78d436eb6c38bea
tree512a1937181862a2151ed2da8762bdf5e6258a70
parent9a27e639481882b59a8ef123e0b69a9a719f08b9
Calculate inverse scale for distance field text in vertex shader

This is for the uniform scale case only. Using the dFdx() function on certain
Mali GPUs causes issues because the precision is too low, so we have to
compute 1/scale from the view matrix instead.

BUG=skia:3528

Review URL: https://codereview.chromium.org/1029423003
src/gpu/GrDistanceFieldTextContext.cpp
src/gpu/effects/GrDistanceFieldTextureEffect.cpp
src/gpu/effects/GrDistanceFieldTextureEffect.h