Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: src/core/SkXfermode.cpp

Issue 227233007: Fix EffectKey for XferEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698