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

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

Issue 647183002: Revert of Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: 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 a20b0d6b0d87ea7110b2ee0d0e8238dd8d0037d5..e5eae9d884cd8014cc0406946c1b37d0e20bfb31 100644
--- a/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp
@@ -18,13 +18,15 @@
, fSeparableVaryingInfos(kVarsPerBlock) {
}
-void GrGLNvprProgramBuilder::emitTransforms(const GrFragmentStage& processorStage,
+void GrGLNvprProgramBuilder::emitTransforms(const GrProcessorStage& processorStage,
GrGLProcessor::TransformedCoordsArray* outCoords,
- GrGLInstalledFragProc* ifp) {
- const GrFragmentProcessor* effect = processorStage.getProcessor();
+ GrGLInstalledProcessors* installedProcessors) {
+ const GrProcessor* effect = processorStage.getProcessor();
int numTransforms = effect->numTransforms();
- ifp->fTransforms.push_back_n(numTransforms);
+ SkTArray<GrGLInstalledProcessors::Transform, true>& transforms =
+ installedProcessors->addTransforms();
+ transforms.push_back_n(numTransforms);
for (int t = 0; t < numTransforms; t++) {
GrSLType varyingType =
@@ -41,24 +43,24 @@
}
const char* vsVaryingName;
const char* fsVaryingName;
- ifp->fTransforms[t].fHandle = this->addSeparableVarying(varyingType, varyingName,
- &vsVaryingName, &fsVaryingName);
- ifp->fTransforms[t].fType = varyingType;
+ transforms[t].fHandle = this->addSeparableVarying(varyingType, varyingName,
+ &vsVaryingName, &fsVaryingName);
+ transforms[t].fType = varyingType;
SkNEW_APPEND_TO_TARRAY(outCoords, GrGLProcessor::TransformedCoords,
(SkString(fsVaryingName), varyingType));
}
}
-GrGLInstalledFragProc::ShaderVarHandle
+GrGLInstalledProcessors::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 GrGLInstalledFragProc::ShaderVarHandle(fSeparableVaryingInfos.count() - 1);
+ return GrGLInstalledProcessors::ShaderVarHandle(fSeparableVaryingInfos.count() - 1);
}
void GrGLNvprProgramBuilder::resolveSeparableVaryings(GrGLuint programId) {
@@ -78,5 +80,5 @@
// building
this->resolveSeparableVaryings(programID);
return SkNEW_ARGS(GrGLNvprProgram, (fGpu, fDesc, fUniformHandles, programID, fUniforms,
- fFragmentProcessors.get(), fSeparableVaryingInfos));
+ fColorEffects, fCoverageEffects, 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