bug fix for k1
TBR=
BUG=skia:
Review URL: https://codereview.chromium.org/675213003
diff --git a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
index 86b1d7f..3d991a2 100644
--- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
@@ -39,22 +39,18 @@
suffixedVaryingName.appendf("_%i", t);
varyingName = suffixedVaryingName.c_str();
}
- const char* vsVaryingName;
- const char* fsVaryingName;
- ifp->fTransforms[t].fHandle = this->addSeparableVarying(varyingType, varyingName,
- &vsVaryingName, &fsVaryingName);
+ GrGLVertToFrag v(varyingType);
+ ifp->fTransforms[t].fHandle = this->addSeparableVarying(varyingName, &v);
ifp->fTransforms[t].fType = varyingType;
SkNEW_APPEND_TO_TARRAY(outCoords, GrGLProcessor::TransformedCoords,
- (SkString(fsVaryingName), varyingType));
+ (SkString(v.fsIn()), varyingType));
}
}
GrGLInstalledFragProc::ShaderVarHandle
-GrGLNvprProgramBuilder::addSeparableVarying(GrSLType type,
- const char* name,
- const char** vsOutName,
- const char** fsInName) {
+GrGLNvprProgramBuilder::addSeparableVarying(const char* name, GrGLVarying* v) {
+ this->addVarying(name, v);
SeparableVaryingInfo& varying = fSeparableVaryingInfos.push_back();
varying.fVariable = fFS.fInputs.back();
return GrGLInstalledFragProc::ShaderVarHandle(fSeparableVaryingInfos.count() - 1);