| Index: include/gpu/GrTBackendEffectFactory.h
|
| diff --git a/include/gpu/GrTBackendEffectFactory.h b/include/gpu/GrTBackendEffectFactory.h
|
| index 1a01e1c274c21badd04ecca10c276bc4fa53a559..9528f8a367c851891efe17d9f79a4855ebf3467d 100644
|
| --- a/include/gpu/GrTBackendEffectFactory.h
|
| +++ b/include/gpu/GrTBackendEffectFactory.h
|
| @@ -35,19 +35,29 @@ public:
|
| SkASSERT(kIllegalEffectClassID != fEffectClassID);
|
| EffectKey effectKey = GLEffect::GenKey(drawEffect, caps);
|
| EffectKey textureKey = GLEffect::GenTextureKey(drawEffect, caps);
|
| + EffectKey transformKey = GLEffect::GenTransformKey(drawEffect);
|
| EffectKey attribKey = GLEffect::GenAttribKey(drawEffect);
|
| #ifdef SK_DEBUG
|
| - static const EffectKey kIllegalIDMask = (uint16_t) (~((1U << kEffectKeyBits) - 1));
|
| - SkASSERT(!(kIllegalIDMask & effectKey));
|
| + static const EffectKey kIllegalEffectKeyMask = (uint16_t) (~((1U << kEffectKeyBits) - 1));
|
| + SkASSERT(!(kIllegalEffectKeyMask & effectKey));
|
|
|
| static const EffectKey kIllegalTextureKeyMask = (uint16_t) (~((1U << kTextureKeyBits) - 1));
|
| SkASSERT(!(kIllegalTextureKeyMask & textureKey));
|
|
|
| + static const EffectKey kIllegalTransformKeyMask = (uint16_t) (~((1U << kTransformKeyBits) - 1));
|
| + SkASSERT(!(kIllegalTransformKeyMask & transformKey));
|
| +
|
| static const EffectKey kIllegalAttribKeyMask = (uint16_t) (~((1U << kAttribKeyBits) - 1));
|
| SkASSERT(!(kIllegalAttribKeyMask & textureKey));
|
| +
|
| + static const EffectKey kIllegalClassIDMask = (uint16_t) (~((1U << kClassIDBits) - 1));
|
| + SkASSERT(!(kIllegalClassIDMask & fEffectClassID));
|
| #endif
|
| - return fEffectClassID | (attribKey << (kEffectKeyBits+kTextureKeyBits)) |
|
| - (textureKey << kEffectKeyBits) | effectKey;
|
| + return (fEffectClassID << (kEffectKeyBits+kTextureKeyBits+kTransformKeyBits+kAttribKeyBits)) |
|
| + (attribKey << (kEffectKeyBits+kTextureKeyBits+kTransformKeyBits)) |
|
| + (transformKey << (kEffectKeyBits+kTextureKeyBits)) |
|
| + (textureKey << kEffectKeyBits) |
|
| + (effectKey);
|
| }
|
|
|
| /** Returns a new instance of the appropriate *GL* implementation class
|
| @@ -71,7 +81,7 @@ public:
|
|
|
| protected:
|
| GrTBackendEffectFactory() {
|
| - fEffectClassID = GenID() << (kAttribKeyBits + kEffectKeyBits + kTextureKeyBits) ;
|
| + fEffectClassID = GenID();
|
| }
|
| };
|
|
|
|
|