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

Unified Diff: src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp

Issue 637003003: Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: memory leaks fixed Created 6 years, 2 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 | « src/gpu/gl/builders/GrGLNvprProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
index e5eae9d884cd8014cc0406946c1b37d0e20bfb31..a20b0d6b0d87ea7110b2ee0d0e8238dd8d0037d5 100644
--- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
@@ -18,15 +18,13 @@ GrGLNvprProgramBuilder::GrGLNvprProgramBuilder(GrGpuGL* gpu,
, fSeparableVaryingInfos(kVarsPerBlock) {
}
-void GrGLNvprProgramBuilder::emitTransforms(const GrProcessorStage& processorStage,
+void GrGLNvprProgramBuilder::emitTransforms(const GrFragmentStage& processorStage,
GrGLProcessor::TransformedCoordsArray* outCoords,
- GrGLInstalledProcessors* installedProcessors) {
- const GrProcessor* effect = processorStage.getProcessor();
+ GrGLInstalledFragProc* ifp) {
+ const GrFragmentProcessor* effect = processorStage.getProcessor();
int numTransforms = effect->numTransforms();
- SkTArray<GrGLInstalledProcessors::Transform, true>& transforms =
- installedProcessors->addTransforms();
- transforms.push_back_n(numTransforms);
+ ifp->fTransforms.push_back_n(numTransforms);
for (int t = 0; t < numTransforms; t++) {
GrSLType varyingType =
@@ -43,24 +41,24 @@ void GrGLNvprProgramBuilder::emitTransforms(const GrProcessorStage& processorSta
}
const char* vsVaryingName;
const char* fsVaryingName;
- transforms[t].fHandle = this->addSeparableVarying(varyingType, varyingName,
- &vsVaryingName, &fsVaryingName);
- transforms[t].fType = varyingType;
+ ifp->fTransforms[t].fHandle = this->addSeparableVarying(varyingType, varyingName,
+ &vsVaryingName, &fsVaryingName);
+ ifp->fTransforms[t].fType = varyingType;
SkNEW_APPEND_TO_TARRAY(outCoords, GrGLProcessor::TransformedCoords,
(SkString(fsVaryingName), varyingType));
}
}
-GrGLInstalledProcessors::ShaderVarHandle
+GrGLInstalledFragProc::ShaderVarHandle
GrGLNvprProgramBuilder::addSeparableVarying(GrSLType type,
- const char* name,
- const char** vsOutName,
- const char** fsInName) {
+ const char* name,
+ const char** vsOutName,
+ const char** fsInName) {
addVarying(type, name, vsOutName, fsInName);
SeparableVaryingInfo& varying = fSeparableVaryingInfos.push_back();
varying.fVariable = fFS.fInputs.back();
- return GrGLInstalledProcessors::ShaderVarHandle(fSeparableVaryingInfos.count() - 1);
+ return GrGLInstalledFragProc::ShaderVarHandle(fSeparableVaryingInfos.count() - 1);
}
void GrGLNvprProgramBuilder::resolveSeparableVaryings(GrGLuint programId) {
@@ -80,5 +78,5 @@ GrGLProgram* GrGLNvprProgramBuilder::createProgram(GrGLuint programID) {
// building
this->resolveSeparableVaryings(programID);
return SkNEW_ARGS(GrGLNvprProgram, (fGpu, fDesc, fUniformHandles, programID, fUniforms,
- fColorEffects, fCoverageEffects, fSeparableVaryingInfos));
+ fFragmentProcessors.get(), fSeparableVaryingInfos));
}
« no previous file with comments | « src/gpu/gl/builders/GrGLNvprProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698