aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2014-10-24 08:24:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-24 08:24:08 -0700
commitc6f3e2c17b3a7ccfd1ca473652ee9e34e89fad0a (patch)
tree9a3513c2b89ce1c65d3c4016d4bb933abb6658bb /src/gpu/effects/GrCustomCoordsTextureEffect.cpp
parent20b7960798320e6804ffee78fd92e6c001eba30b (diff)
Revert of Added varying struct (patchset #9 id:160001 of https://codereview.chromium.org/671023002/)
Reason for revert: may have caused gm change on arm Original issue's description: > Added varying struct > > TBR= > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/852ae80b9c3c6fd53f993ac35133d80863993cbe TBR=bsalomon@google.com,joshualitt@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/675193002
Diffstat (limited to 'src/gpu/effects/GrCustomCoordsTextureEffect.cpp')
-rw-r--r--src/gpu/effects/GrCustomCoordsTextureEffect.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
index afa0754603..84f6b43295 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
@@ -24,20 +24,23 @@ public:
args.fGP.cast<GrCustomCoordsTextureEffect>();
SkASSERT(1 == customCoordsTextureEffect.getVertexAttribs().count());
- GrGLVertToFrag v(kVec2f_GrSLType);
- args.fPB->addVarying("TextureCoords", &v);
+ SkString fsCoordName;
+ const char* vsVaryingName;
+ const char* fsVaryingNamePtr;
+ args.fPB->addVarying(kVec2f_GrSLType, "textureCoords", &vsVaryingName, &fsVaryingNamePtr);
+ fsCoordName = fsVaryingNamePtr;
GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder();
const GrShaderVar& inTextureCoords = customCoordsTextureEffect.inTextureCoords();
- vsBuilder->codeAppendf("%s = %s;", v.vsOut(), inTextureCoords.c_str());
+ vsBuilder->codeAppendf("\t%s = %s;\n", vsVaryingName, inTextureCoords.c_str());
GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder();
- fsBuilder->codeAppendf("%s = ", args.fOutput);
+ fsBuilder->codeAppendf("\t%s = ", args.fOutput);
fsBuilder->appendTextureLookupAndModulate(args.fInput,
args.fSamplers[0],
- v.fsIn(),
+ fsCoordName.c_str(),
kVec2f_GrSLType);
- fsBuilder->codeAppend(";");
+ fsBuilder->codeAppend(";\n");
}
virtual void setData(const GrGLProgramDataManager&,