Move the GL shader compilation step into GrGLShaderBuilder
Moves the compilation step and a few other blocks of code from
GrGLProgram to GrGLShaderBuilder. This way GrGLProgram doesn't have to
know whether or not there is a vertex shader.
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/23533066
git-svn-id: http://skia.googlecode.com/svn/trunk@11523 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 09f7668..0304acf 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -172,25 +172,10 @@
*/
bool genProgram(const GrEffectStage* colorStages[], const GrEffectStage* coverageStages[]);
- GrSLConstantVec genInputColor(GrGLShaderBuilder* builder, SkString* inColor);
-
- GrSLConstantVec genInputCoverage(GrGLShaderBuilder* builder, SkString* inCoverage);
-
- void genGeometryShader(GrGLShaderBuilder::VertexBuilder* vertexBuilder) const;
-
- // Creates a GL program ID, binds shader attributes to GL vertex attrs, and links the program
- bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder,
- bool bindColorOut,
- bool bindDualSrcOut);
-
// Sets the texture units for samplers
void initSamplerUniforms();
void initEffectSamplerUniforms(EffectAndSamplers* effect, int* texUnitIdx);
- bool compileShaders(const GrGLShaderBuilder& builder);
-
- const char* adjustInColor(const SkString& inColor) const;
-
// Helper for setData().
void setEffectData(const GrEffectStage& stage, const EffectAndSamplers& effect);
@@ -205,10 +190,7 @@
// Helper for setData() that sets the view matrix and loads the render target height uniform
void setMatrixAndRenderTargetHeight(const GrDrawState&);
- // GL IDs
- GrGLuint fVShaderID;
- GrGLuint fGShaderID;
- GrGLuint fFShaderID;
+ // GL program ID
GrGLuint fProgramID;
// these reflect the current values of uniforms (GL uniform values travel with program)