diff options
author | robertphillips <robertphillips@google.com> | 2016-04-08 08:01:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-08 08:01:20 -0700 |
commit | ef6a47b4af1ebf621682b3398916fefb90fc912e (patch) | |
tree | e9ddad02013f8a95a993b5ad8ef53cab16e65329 /bench | |
parent | 2bb3b6d2bb2cb3cc72ba254b34fadde5319c141a (diff) |
Update MatrixConvolutionImageFilter to sk_sp
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869833002
Review URL: https://codereview.chromium.org/1869833002
Diffstat (limited to 'bench')
-rw-r--r-- | bench/MatrixConvolutionBench.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bench/MatrixConvolutionBench.cpp b/bench/MatrixConvolutionBench.cpp index 05f0193cec..da61891e73 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); ) |