aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkMorphologyImageFilter.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 17:53:18 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 17:53:18 +0000
commit28a15fb8d603847949a61657ef5cb73ed9915021 (patch)
tree0078f8fb070a3f0c11c03d2f7a9df5a2912273c9 /src/effects/SkMorphologyImageFilter.cpp
parentc96982f806712dee912875b0bd59b75468ac3a99 (diff)
Make GrGLEffect::setData take GrEffectStage rather than GrEffect.
This allows the coord-change matrix to be communicated to setData(). An accessor for this matrix is also added to GrEffectStage. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6779057 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6143 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkMorphologyImageFilter.cpp')
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 3273798b9d..f561eaaef4 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -281,7 +281,7 @@ public:
static inline EffectKey GenKey(const GrEffect& s, const GrGLCaps& caps);
- virtual void setData(const GrGLUniformManager&, const GrEffect&) SK_OVERRIDE;
+ virtual void setData(const GrGLUniformManager&, const GrEffectStage&) SK_OVERRIDE;
private:
int width() const { return GrMorphologyEffect::WidthFromRadius(fRadius); }
@@ -349,11 +349,9 @@ GrGLEffect::EffectKey GrGLMorphologyEffect::GenKey(const GrEffect& s,
return key;
}
-void GrGLMorphologyEffect::setData(const GrGLUniformManager& uman, const GrEffect& data) {
- const Gr1DKernelEffect& kern =
- static_cast<const Gr1DKernelEffect&>(data);
- GrGLTexture& texture =
- *static_cast<GrGLTexture*>(data.texture(0));
+void GrGLMorphologyEffect::setData(const GrGLUniformManager& uman, const GrEffectStage& stage) {
+ const Gr1DKernelEffect& kern = static_cast<const Gr1DKernelEffect&>(*stage.getEffect());
+ GrGLTexture& texture = *static_cast<GrGLTexture*>(kern.texture(0));
// the code we generated was for a specific kernel radius
GrAssert(kern.radius() == fRadius);
float imageIncrement[2] = { 0 };