Index: src/core/SkXfermode.cpp |
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp |
index 674078ef3a1edebb3d63f69cef1beb4166a27bf4..78b85daa3e4e1ab546b87e6d33b9b89b8269692e 100644 |
--- a/src/core/SkXfermode.cpp |
+++ b/src/core/SkXfermode.cpp |
@@ -1079,7 +1079,10 @@ public: |
} |
static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) { |
- return drawEffect.castEffect<XferEffect>().mode(); |
+ // The background may come from the dst or from a texture. |
+ int numTextures = (*drawEffect.effect())->numTextures(); |
+ SkASSERT(numTextures <= 1); |
+ return (drawEffect.castEffect<XferEffect>().mode() << 1) | numTextures; |
} |
private: |