aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgramStage.h
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-24 17:44:30 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-24 17:44:30 +0000
commit5259814305e3290dea3b197301f7824a14c5fa6f (patch)
tree7f04020f99f01833c1d8e63b910c8490b0ae0e34 /src/gpu/gl/GrGLProgramStage.h
parent3fd979874c5bd233a8f731fb68fca87f84712a52 (diff)
Move swizzle & modulation computation, non-virtual functions onto
GrGLShaderBuilder. This lets us access all the default computations when there's no GrCustomStage specified, and means that GrGLProgramStage is effectively an interface class, all of whose functions can/should be overriden. http://codereview.appspot.com/6242051/ git-svn-id: http://skia.googlecode.com/svn/trunk@4045 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGLProgramStage.h')
-rw-r--r--src/gpu/gl/GrGLProgramStage.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/gpu/gl/GrGLProgramStage.h b/src/gpu/gl/GrGLProgramStage.h
index 60ab60dbd8..0d2d66061e 100644
--- a/src/gpu/gl/GrGLProgramStage.h
+++ b/src/gpu/gl/GrGLProgramStage.h
@@ -96,43 +96,10 @@ public:
GrCustomStage* stage,
int stageNum);
- // TODO: needs a better name
- enum SamplerMode {
- kDefault_SamplerMode,
- kProj_SamplerMode,
- kExplicitDivide_SamplerMode // must do an explicit divide
- };
-
- void setSamplerMode(SamplerMode samplerMode) { fSamplerMode = samplerMode; }
-
- /** Does perspective divide or other necessary transform, then
- updates the name of the sample coordinates. */
- void emitTextureSetup(GrGLShaderBuilder* segments);
-
- /** Human-meaningful string to identify this effect; may be embedded
- in generated shader code. Because the implementation is delegated to
- the factory, the name will be the same as that of the generating
- GrCustomStage. */
const char* name() const { return fFactory.name(); }
protected:
- /** Convenience function for subclasses to write texture2D() or
- texture2DProj(), depending on fSamplerMode. */
- void emitTextureLookup(GrStringBuilder* code,
- const char* samplerName,
- const char* coordName);
-
- /** Standard texture fetch, complete with swizzle & modulate if
- appropriate. */
- void emitDefaultFetch(GrGLShaderBuilder* state,
- const char* fsOutColor,
- const char* samplerName,
- const char* swizzle,
- const char* modulate);
-
- SamplerMode fSamplerMode;
-
const GrProgramStageFactory& fFactory;
};