Index: bench/BlurImageFilterBench.cpp |
diff --git a/bench/BlurImageFilterBench.cpp b/bench/BlurImageFilterBench.cpp |
index 7ed600632a1c3141ee1fab87dbcf6a53d7241f0e..f0a7a8eea0315dc54e2dd7e4fdb14cd4dd61ef32 100644 |
--- a/bench/BlurImageFilterBench.cpp |
+++ b/bench/BlurImageFilterBench.cpp |
@@ -80,7 +80,8 @@ protected: |
const SkImageFilter::CropRect* crop = |
fIsExpanded ? &cropRectLarge : fIsCropped ? &cropRect : nullptr; |
- paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY, input, crop))->unref(); |
+ SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(fSigmaX, fSigmaY, input, crop)); |
+ paint.setImageFilter(blur); |
for (int i = 0; i < loops; i++) { |
canvas->drawBitmap(fCheckerboard, kX, kY, &paint); |