aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkBlurImageFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkBlurImageFilter.cpp')
-rw-r--r--src/effects/SkBlurImageFilter.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index 0625d37a42..4e1fde250b 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -121,21 +121,20 @@ sk_sp<SkSpecialImage> SkBlurImageFilter::onFilterImage(SkSpecialImage* source,
inputBounds.offset(-inputOffset);
dstBounds.offset(-inputOffset);
SkRect inputBoundsF(SkRect::Make(inputBounds));
- sk_sp<GrDrawContext> drawContext(SkGpuBlurUtils::GaussianBlur(
- context,
- inputTexture.get(),
- source->props().isGammaCorrect(),
- SkRect::Make(dstBounds),
- &inputBoundsF,
- sigma.x(),
- sigma.y()));
- if (!drawContext) {
+ sk_sp<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(context,
+ inputTexture.get(),
+ source->props().isGammaCorrect(),
+ SkRect::Make(dstBounds),
+ &inputBoundsF,
+ sigma.x(),
+ sigma.y()));
+ if (!tex) {
return nullptr;
}
return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(dstBounds.width(), dstBounds.height()),
kNeedNewImageUniqueID_SpecialImage,
- drawContext->asTexture(), &source->props());
+ std::move(tex), &source->props());
}
#endif