Make morphology, convolution, and table color filter opt out of default texture matrices.
Review URL: https://codereview.appspot.com/6817077

git-svn-id: http://skia.googlecode.com/svn/trunk@6280 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrBackendEffectFactory.h b/include/gpu/GrBackendEffectFactory.h
index c496f5a..7b43711 100644
--- a/include/gpu/GrBackendEffectFactory.h
+++ b/include/gpu/GrBackendEffectFactory.h
@@ -32,7 +32,7 @@
 public:
     typedef uint32_t EffectKey;
     enum {
-        kEffectKeyBits = 10,
+        kEffectKeyBits = 12,
         /**
          * Some aspects of the generated code may be determined by the particular textures that are
          * associated with the effect. These manipulations are performed by GrGLShaderBuilder beyond
@@ -64,12 +64,15 @@
     }
 
     static EffectKey GenID() {
+        static const int32_t kClassIDBits = 8 * sizeof(EffectKey) -
+                                            kTextureKeyBits -
+                                            kEffectKeyBits;
         // fCurrEffectClassID has been initialized to kIllegalEffectClassID. The
         // atomic inc returns the old value not the incremented value. So we add
         // 1 to the returned value.
         int32_t id = sk_atomic_inc(&fCurrEffectClassID) + 1;
-        GrAssert(id < (1 << (8 * sizeof(EffectKey) - kEffectKeyBits)));
-        return id;
+        GrAssert(id < (1 << kClassIDBits));
+        return static_cast<EffectKey>(id);
     }
 
     EffectKey fEffectClassID;