diff options
author | jvanverth <jvanverth@google.com> | 2015-02-23 13:08:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-23 13:08:39 -0800 |
commit | 9671ecd44e48e8bbe1361830717b79c9c4dc9d17 (patch) | |
tree | 1e17930454ee8405837f205ff6d28a57a3e3fa31 /src | |
parent | 6df8e3495a677a5df2476d2ff3bbe878fd178e4b (diff) |
Use highp for distance field texture coord varyings.
Because the glyph texture atlas is 1024x2048, on certain platforms
using mediump UVs is not enough resolution for doing texture lookups
and getting good results for distance fields. Bumping these
to highp solves this problem.
BUG=skia:3445
Review URL: https://codereview.chromium.org/951003002
Diffstat (limited to 'src')
-rwxr-xr-x | src/gpu/effects/GrDistanceFieldTextureEffect.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp index 9015a6ff43..3b9bc9b6f0 100755 --- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp +++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp @@ -50,11 +50,11 @@ public: vsBuilder->emitAttributes(dfTexEffect); GrGLVertToFrag st(kVec2f_GrSLType); - args.fPB->addVarying("IntTextureCoords", &st); + args.fPB->addVarying("IntTextureCoords", &st, kHigh_GrSLPrecision); vsBuilder->codeAppendf("%s = %s;", st.vsOut(), dfTexEffect.inTextureCoords()->fName); GrGLVertToFrag uv(kVec2f_GrSLType); - args.fPB->addVarying("TextureCoords", &uv); + args.fPB->addVarying("TextureCoords", &uv, kHigh_GrSLPrecision); // this is only used with text, so our texture bounds always match the glyph atlas vsBuilder->codeAppendf("%s = vec2(" GR_FONT_ATLAS_RECIP_WIDTH ", " GR_FONT_ATLAS_RECIP_HEIGHT ")*%s;", uv.vsOut(), @@ -335,7 +335,7 @@ public: vsBuilder->emitAttributes(dfTexEffect); GrGLVertToFrag v(kVec2f_GrSLType); - args.fPB->addVarying("TextureCoords", &v); + args.fPB->addVarying("TextureCoords", &v, kHigh_GrSLPrecision); // setup pass through color this->setupColorPassThrough(pb, local.fInputColorType, args.fOutputColor, @@ -576,11 +576,11 @@ public: vsBuilder->emitAttributes(dfTexEffect); GrGLVertToFrag st(kVec2f_GrSLType); - args.fPB->addVarying("IntTextureCoords", &st); + args.fPB->addVarying("IntTextureCoords", &st, kHigh_GrSLPrecision); vsBuilder->codeAppendf("%s = %s;", st.vsOut(), dfTexEffect.inTextureCoords()->fName); GrGLVertToFrag uv(kVec2f_GrSLType); - args.fPB->addVarying("TextureCoords", &uv); + args.fPB->addVarying("TextureCoords", &uv, kHigh_GrSLPrecision); // this is only used with text, so our texture bounds always match the glyph atlas vsBuilder->codeAppendf("%s = vec2(" GR_FONT_ATLAS_RECIP_WIDTH ", " GR_FONT_ATLAS_RECIP_HEIGHT ")*%s;", uv.vsOut(), |