aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgram.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 21:29:51 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 21:29:51 +0000
commit6eac42e3ab68b085117d7f91621276a722b5a3a7 (patch)
tree0f477cafdc2581a70fab4a8baf4b122ae72ef782 /src/gpu/gl/GrGLProgram.h
parentd0f824cfbd8951bb948b19d7ff5dce028ce557a5 (diff)
Incremental refactoring of GrGLProgram and GrGLShaderBuilder
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/302663006 git-svn-id: http://skia.googlecode.com/svn/trunk@14980 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGLProgram.h')
-rw-r--r--src/gpu/gl/GrGLProgram.h49
1 files changed, 20 insertions, 29 deletions
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index a9a2da222e..4d5ce0f24d 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -166,18 +166,8 @@ private:
GrGLProgram(GrGpuGL* gpu,
const GrGLProgramDesc& desc,
- const GrEffectStage* colorStages[],
- const GrEffectStage* coverageStages[]);
-
- bool succeeded() const { return 0 != fProgramID; }
-
- /**
- * This is the heavy initialization routine for building a GLProgram. colorStages and
- * coverageStages correspond to the output of GrGLProgramDesc::Build().
- */
- bool genProgram(GrGLShaderBuilder* builder,
- const GrEffectStage* colorStages[],
- const GrEffectStage* coverageStages[]);
+ GrGLUniformManager* uman,
+ const GrGLShaderBuilder::GenProgramOutput& builderOutput);
// Sets the texture units for samplers
void initSamplerUniforms();
@@ -194,25 +184,26 @@ private:
void setMatrixAndRenderTargetHeight(const GrDrawState&);
// GL program ID
- GrGLuint fProgramID;
+ GrGLuint fProgramID;
// these reflect the current values of uniforms (GL uniform values travel with program)
- MatrixState fMatrixState;
- GrColor fColor;
- GrColor fCoverage;
- int fDstCopyTexUnit;
-
- SkAutoTDelete<GrGLProgramEffects> fColorEffects;
- SkAutoTDelete<GrGLProgramEffects> fCoverageEffects;
-
- GrGLProgramDesc fDesc;
- GrGpuGL* fGpu;
-
- GrGLUniformManager fUniformManager;
- GrGLShaderBuilder::UniformHandles fUniformHandles;
-
- bool fHasVertexShader;
- int fNumTexCoordSets;
+ MatrixState fMatrixState;
+ GrColor fColor;
+ GrColor fCoverage;
+ int fDstCopyTexUnit;
+
+ SkAutoTDelete<GrGLProgramEffects> fColorEffects;
+ SkAutoTDelete<GrGLProgramEffects> fCoverageEffects;
+
+ GrGLProgramDesc fDesc;
+
+ GrGpuGL* fGpu;
+
+ SkAutoTUnref<GrGLUniformManager> fUniformManager;
+ GrGLShaderBuilder::UniformHandles fUniformHandles;
+
+ bool fHasVertexShader;
+ int fNumTexCoordSets;
typedef SkRefCnt INHERITED;
};