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-16 15:19:45 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-16 15:19:45 +0000
commitdfdb7e5240276493077b7c6e1f3cc8b8a0e195ba (patch)
tree8052c43cb50ba6f2c5c2f8fb9a3c518e17b43d2c /src/effects/SkMorphologyImageFilter.cpp
parentf6eac8af585e44d56e6b18d269e6c34f9917ea88 (diff)
Reland r5963 with two fixes:
Missing ref in GrSweepGradient::TestCreate. Must reset() the sampler in setup_drawstate_aaclip() to avoid hitting a (dubious) assert. git-svn-id: http://skia.googlecode.com/svn/trunk@5964 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkMorphologyImageFilter.cpp')
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 64d22be56e..9bddb9b9e6 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -431,8 +431,7 @@ void apply_morphology_pass(GrContext* context,
GrMatrix sampleM;
sampleM.setIDiv(texture->width(), texture->height());
GrPaint paint;
- paint.colorSampler(0)->reset(sampleM);
- paint.colorSampler(0)->setCustomStage(SkNEW_ARGS(GrMorphologyEffect, (texture, direction, radius, morphType)))->unref();
+ paint.colorSampler(0)->setCustomStage(SkNEW_ARGS(GrMorphologyEffect, (texture, direction, radius, morphType)), sampleM)->unref();
context->drawRect(paint, rect);
}