Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: src/gpu/effects/GrDistanceFieldTextureEffect.cpp

Issue 951003002: Use highp for distance field texture coord varyings. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add highp to other DF shaders Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldTextureEffect.cpp
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
index 9015a6ff43dd59acadc988512dc23548ebadf4ee..3b9bc9b6f0dcb7e111779f7bd136a3bb52747e8a 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(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698