Index: bench/MatrixConvolutionBench.cpp |
diff --git a/bench/MatrixConvolutionBench.cpp b/bench/MatrixConvolutionBench.cpp |
index 05f0193ceca7c0276f4a0b8a8fbf8bff1b2c0825..da61891e732792f317ad7c687b381d9916ab5bf2 100644 |
--- a/bench/MatrixConvolutionBench.cpp |
+++ b/bench/MatrixConvolutionBench.cpp |
@@ -23,11 +23,9 @@ public: |
}; |
SkScalar gain = 0.3f, bias = SkIntToScalar(100); |
SkIPoint kernelOffset = SkIPoint::Make(1, 1); |
- fFilter = SkMatrixConvolutionImageFilter::Create(kernelSize, kernel, gain, bias, kernelOffset, tileMode, convolveAlpha); |
- } |
- |
- ~MatrixConvolutionBench() { |
- fFilter->unref(); |
+ fFilter = SkMatrixConvolutionImageFilter::Make(kernelSize, kernel, gain, bias, |
+ kernelOffset, tileMode, convolveAlpha, |
+ nullptr); |
} |
protected: |
@@ -49,9 +47,10 @@ protected: |
} |
private: |
- typedef Benchmark INHERITED; |
- SkImageFilter* fFilter; |
+ sk_sp<SkImageFilter> fFilter; |
SkString fName; |
+ |
+ typedef Benchmark INHERITED; |
}; |
DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kClamp_TileMode, true); ) |