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

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

Issue 675193002: Revert of Added varying struct (Closed) Base URL: https://skia.googlesource.com/skia.git@gp_emit_struct
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/GrGLGeometryShaderBuilder.h ('k') | src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp b/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
index af95f564cf885b54b024a78a2ae2ca02a5de036d..8a3b1f4a6eb7df27dd8826509c637e4601afb565 100644
--- a/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp
@@ -15,26 +15,25 @@
}
-void GrGLGeometryBuilder::addVarying(const char* name, GrGLVarying* v) {
+void GrGLGeometryBuilder::addVarying(GrSLType type,
+ const char* name,
+ const char** gsOutName) {
// if we have a GS take each varying in as an array
// and output as non-array.
- if (v->vsVarying()) {
- fInputs.push_back();
- fInputs.back().setType(v->fType);
- fInputs.back().setTypeModifier(GrGLShaderVar::kVaryingIn_TypeModifier);
- fInputs.back().setUnsizedArray();
- *fInputs.back().accessName() = v->fVsOut;
- v->fGsIn = v->fVsOut;
- }
-
- if (v->fsVarying()) {
- fOutputs.push_back();
- fOutputs.back().setType(v->fType);
- fOutputs.back().setTypeModifier(GrGLShaderVar::kVaryingOut_TypeModifier);
- fProgramBuilder->nameVariable(fOutputs.back().accessName(), 'g', name);
- v->fGsOut = fOutputs.back().getName().c_str();
+ fInputs.push_back();
+ fInputs.back().setType(type);
+ fInputs.back().setTypeModifier(GrGLShaderVar::kVaryingIn_TypeModifier);
+ fInputs.back().setUnsizedArray();
+ *fInputs.back().accessName() = name;
+ fOutputs.push_back();
+ fOutputs.back().setType(type);
+ fOutputs.back().setTypeModifier(GrGLShaderVar::kVaryingOut_TypeModifier);
+ fProgramBuilder->nameVariable(fOutputs.back().accessName(), 'g', name);
+ if (gsOutName) {
+ *gsOutName = fOutputs.back().getName().c_str();
}
}
+
bool GrGLGeometryBuilder::compileAndAttachShaders(GrGLuint programId,
SkTDArray<GrGLuint>* shaderIds) const {
« no previous file with comments | « src/gpu/gl/builders/GrGLGeometryShaderBuilder.h ('k') | src/gpu/gl/builders/GrGLNvprProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698