aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkXfermode.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-09-16 08:21:41 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-16 08:21:42 -0700
commit49586bec7383d4ccb81f85f8e2dc4162e2d4f6a8 (patch)
tree715c9fa39ab2e4b790c401f2c0399be200bbbfc8 /src/core/SkXfermode.cpp
parent8a4c1030ff4b8336b5ac5b0712691e2f65383440 (diff)
removing GrDrawEffect
BUG=skia: Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/571163002
Diffstat (limited to 'src/core/SkXfermode.cpp')
-rw-r--r--src/core/SkXfermode.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 91aa84706b..db9d332e79 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -818,18 +818,19 @@ public:
class GLEffect : public GrGLEffect {
public:
- GLEffect(const GrBackendEffectFactory& factory, const GrDrawEffect&)
+ GLEffect(const GrBackendEffectFactory& factory, const GrEffect&)
: GrGLEffect(factory) {
}
virtual void emitCode(GrGLProgramBuilder* builder,
- const GrDrawEffect& drawEffect,
+ const GrEffect& effect,
const GrEffectKey& key,
const char* outputColor,
const char* inputColor,
const TransformedCoordsArray& coords,
const TextureSamplerArray& samplers) SK_OVERRIDE {
- SkXfermode::Mode mode = drawEffect.castEffect<XferEffect>().mode();
- const GrTexture* backgroundTex = drawEffect.castEffect<XferEffect>().backgroundAccess().getTexture();
+ SkXfermode::Mode mode = effect.cast<XferEffect>().mode();
+ const GrTexture* backgroundTex =
+ effect.cast<XferEffect>().backgroundAccess().getTexture();
GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
const char* dstColor;
if (backgroundTex) {
@@ -970,12 +971,12 @@ public:
}
}
- static inline void GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
+ static inline void GenKey(const GrEffect& effect, const GrGLCaps&,
GrEffectKeyBuilder* b) {
// The background may come from the dst or from a texture.
- uint32_t key = drawEffect.effect()->numTextures();
+ uint32_t key = effect.numTextures();
SkASSERT(key <= 1);
- key |= drawEffect.castEffect<XferEffect>().mode() << 1;
+ key |= effect.cast<XferEffect>().mode() << 1;
b->add32(key);
}
@@ -1214,7 +1215,7 @@ private:
}
}
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
- const XferEffect& s = CastEffect<XferEffect>(other);
+ const XferEffect& s = other.cast<XferEffect>();
return fMode == s.fMode &&
fBackgroundAccess.getTexture() == s.fBackgroundAccess.getTexture();
}