diff options
author | joshualitt <joshualitt@chromium.org> | 2014-09-17 07:00:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-17 07:00:35 -0700 |
commit | 408d6125b32c86e1f81ce60465e3bf4491e755fc (patch) | |
tree | b134bbf7bd027899121539ee1db93405af9723ed /src/gpu/gl/builders/GrGLProgramBuilder.h | |
parent | 963504bd0a8ced7e1177ae136da03a9cc343d886 (diff) |
Breaking out full program and frag only
BUG=skia:
R=bsalomon@google.com
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/576543005
Diffstat (limited to 'src/gpu/gl/builders/GrGLProgramBuilder.h')
-rw-r--r-- | src/gpu/gl/builders/GrGLProgramBuilder.h | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h index 6eaf575ba3..9915ad3f05 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.h +++ b/src/gpu/gl/builders/GrGLProgramBuilder.h @@ -281,97 +281,4 @@ private: friend class GrGLGeometryShaderBuilder; }; -//////////////////////////////////////////////////////////////////////////////// - -class GrGLFullProgramBuilder : public GrGLProgramBuilder { -public: - GrGLFullProgramBuilder(GrGpuGL*, const GrGLProgramDesc&); - - /** 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, - GrGLShaderVar::Precision fsPrecision=GrGLShaderVar::kDefault_Precision); - - /** Add a separable varying input variable to the current program. - * A separable varying (fragment shader input) is a varying that can be used also when vertex - * shaders are not used. With a vertex shader, the operation is same as with other - * varyings. Without a vertex shader, such as with NV_path_rendering, GL APIs are used to - * populate the variable. The APIs can refer to the variable through the returned handle. - */ - VaryingHandle addSeparableVarying(GrSLType type, - const char* name, - const char** vsOutName, - const char** fsInName); - - GrGLVertexShaderBuilder* getVertexShaderBuilder() { return &fVS; } - -private: - virtual void emitCodeBeforeEffects(GrGLSLExpr4* color, - GrGLSLExpr4* coverage) SK_OVERRIDE; - - virtual void emitGeometryProcessor(const GrEffectStage* geometryProcessor, - GrGLSLExpr4* coverage) SK_OVERRIDE; - - virtual GrGLProgramEffects* createAndEmitEffects(const GrEffectStage* effectStages[], - int effectCnt, - const GrGLProgramDesc::EffectKeyProvider&, - GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; - - /* - * These functions are temporary and will eventually operate not on effects but on - * geometry processors - */ - void createAndEmitEffect(GrGLProgramEffectsBuilder*, - const GrEffectStage* effectStage, - const GrGLProgramDesc::EffectKeyProvider&, - GrGLSLExpr4* inOutFSColor); - - GrGLProgramEffects* createAndEmitEffect(const GrEffectStage* geometryProcessor, - const GrGLProgramDesc::EffectKeyProvider&, - GrGLSLExpr4* inOutFSColor); - - virtual void emitCodeAfterEffects() SK_OVERRIDE; - - virtual bool compileAndAttachShaders(GrGLuint programId, - SkTDArray<GrGLuint>* shaderIds) const SK_OVERRIDE; - - virtual void bindProgramLocations(GrGLuint programId) SK_OVERRIDE; - - GrGLGeometryShaderBuilder fGS; - GrGLVertexShaderBuilder fVS; - - typedef GrGLProgramBuilder INHERITED; -}; - -//////////////////////////////////////////////////////////////////////////////// - -class GrGLFragmentOnlyProgramBuilder : public GrGLProgramBuilder { -public: - GrGLFragmentOnlyProgramBuilder(GrGpuGL*, const GrGLProgramDesc&); - - int addTexCoordSets(int count); - -private: - virtual void emitCodeBeforeEffects(GrGLSLExpr4* color, - GrGLSLExpr4* coverage) SK_OVERRIDE {} - - virtual void emitGeometryProcessor(const GrEffectStage* geometryProcessor, - GrGLSLExpr4* coverage) SK_OVERRIDE { - SkASSERT(NULL == geometryProcessor); - } - - virtual GrGLProgramEffects* createAndEmitEffects(const GrEffectStage* effectStages[], - int effectCnt, - const GrGLProgramDesc::EffectKeyProvider&, - GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; - - virtual void emitCodeAfterEffects() SK_OVERRIDE {} - - typedef GrGLProgramBuilder INHERITED; -}; - #endif |