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

Unified Diff: src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp

Issue 1462123003: Create GrGLSLVaryingHandler class for program building (Closed) Base URL: https://skia.googlesource.com/skia.git@putCapsOnArgs
Patch Set: fix release builder Created 5 years, 1 month 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/glsl/GrGLSLGeometryShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
diff --git a/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp b/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
index 275972b8a7e9454586b81e473ed2645a3f231e75..25e9f9e320cc0ecb49f75e8f653d1d6448b49c6d 100644
--- a/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
@@ -7,34 +7,14 @@
#include "GrGLSLGeometryShaderBuilder.h"
#include "GrGLSLProgramBuilder.h"
+#include "GrGLSLVarying.h"
GrGLSLGeometryBuilder::GrGLSLGeometryBuilder(GrGLSLProgramBuilder* program)
: INHERITED(program) {
}
-void GrGLSLGeometryBuilder::addVarying(const char* name,
- GrSLPrecision precision,
- GrGLSLVarying* v) {
- // 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(GrGLSLShaderVar::kVaryingIn_TypeModifier);
- fInputs.back().setPrecision(precision);
- 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(GrGLSLShaderVar::kVaryingOut_TypeModifier);
- fOutputs.back().setPrecision(precision);
- fProgramBuilder->nameVariable(fOutputs.back().accessName(), 'g', name);
- v->fGsOut = fOutputs.back().getName().c_str();
- }
+void GrGLSLGeometryBuilder::onFinalize() {
+ fProgramBuilder->varyingHandler()->getGeomDecls(&this->inputs(), &this->outputs());
}
« no previous file with comments | « src/gpu/glsl/GrGLSLGeometryShaderBuilder.h ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698