Reland r6233 with fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@6241 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h
index 30b8455..0fd5722 100644
--- a/src/gpu/gl/GrGLEffect.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -51,7 +51,9 @@
@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 @@
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;
};