aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLEffect.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-01 17:02:46 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-01 17:02:46 +0000
commitd8b5faca043100d7a1e4594b4d10e462532af390 (patch)
treeb1606326d0bf74396695da623c048fe0921402db /src/gpu/gl/GrGLEffect.h
parent6e7251669cc57515fd2783865fc1cdd49b8b6b9a (diff)
Reland r6233 with fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@6241 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGLEffect.h')
-rw-r--r--src/gpu/gl/GrGLEffect.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h
index 30b8455a68..0fd5722cb8 100644
--- a/src/gpu/gl/GrGLEffect.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -51,7 +51,9 @@ public:
@param builder Interface used to emit code in the shaders.
@param stage The effect stage that generated this program stage.
- @param key The key that was computed by EffectKey() from the generating GrEffect.
+ @param key The key that was computed by GenKey() from the generating GrEffect.
+ Only the bits indicated by GrBackendEffectFactory::kEffectKeyBits are
+ guaranteed to match the value produced by GenKey();
@param vertexCoords A vec2 of texture coordinates in the VS, which may be altered. This will
be removed soon and stages will be responsible for computing their own
coords.
@@ -85,7 +87,14 @@ public:
static EffectKey GenTextureKey(const GrEffect&, const GrGLCaps&);
+ bool requiresTextureMatrix() const { return fRequiresTextureMatrix; }
+
+
protected:
+ // HACK: This is a temporary field that allows GrGLEffect subclasses to opt into the new
+ // shader gen where a texture matrix is not automatically inserted. It defaults to true and is
+ // set to false in a subclass to opt into the new behavior.
+ bool fRequiresTextureMatrix;
const GrBackendEffectFactory& fFactory;
};