diff options
-rw-r--r-- | src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp | 14 | ||||
-rw-r--r-- | src/gpu/gl/builders/GrGLNvprProgramBuilder.h | 5 |
2 files changed, 6 insertions, 13 deletions
diff --git a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp index 86b1d7f167..3d991a2e2c 100644 --- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp +++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp @@ -39,22 +39,18 @@ void GrGLNvprProgramBuilder::emitTransforms(const GrFragmentStage& processorStag 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); diff --git a/src/gpu/gl/builders/GrGLNvprProgramBuilder.h b/src/gpu/gl/builders/GrGLNvprProgramBuilder.h index 4bf7e02414..008aff74d7 100644 --- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.h +++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.h @@ -41,10 +41,7 @@ private: * varyings. Without a vertex shader, such as with NV_path_rendering, GL APIs are used to * populate the variable. The APIs can refer to the variable through the returned handle. */ - ShaderVarHandle addSeparableVarying(GrSLType type, - const char* name, - const char** vsOutName, - const char** fsInName); + ShaderVarHandle addSeparableVarying(const char* name, GrGLVarying* v); void resolveSeparableVaryings(GrGLuint programId); |