Condense setupFSUnis, setupVSUnis, setupVaryings into
GrGLProgramStage::setupVariables().
Rename appendVarying() to addVarying(), matching addUniform().
http://codereview.appspot.com/6262046/
git-svn-id: http://skia.googlecode.com/svn/trunk@4083 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index 79cccc7..1192637 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -26,17 +26,6 @@
GrGLShaderBuilder();
- void appendVarying(GrSLType type,
- const char* name,
- const char** vsOutName = NULL,
- const char** fsInName = NULL);
-
- void appendVarying(GrSLType type,
- const char* name,
- int stageNum,
- const char** vsOutName = NULL,
- const char** fsInName = NULL);
-
void computeSwizzle(uint32_t configFlags);
void computeModulate(const char* fsInColor);
@@ -73,6 +62,26 @@
int stageNum = -1,
int count = GrGLShaderVar::kNonArray);
+ /** Add a varying variable to the current program to pass
+ values between vertex and fragment shaders.
+ If the last two parameters are non-NULL, they are filled
+ in with the name generated. */
+ void addVarying(GrSLType type,
+ const char* name,
+ const char** vsOutName = NULL,
+ const char** fsInName = NULL);
+
+ /** Add a varying variable to the current program to pass
+ values between vertex and fragment shaders;
+ stageNum is appended to the name to guarantee uniqueness.
+ If the last two parameters are non-NULL, they are filled
+ in with the name generated. */
+ void addVarying(GrSLType type,
+ const char* name,
+ int stageNum,
+ const char** vsOutName = NULL,
+ const char** fsInName = NULL);
+
// TODO: needs a better name
enum SamplerMode {
kDefault_SamplerMode,