aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-04-08 08:01:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-08 08:01:20 -0700
commitef6a47b4af1ebf621682b3398916fefb90fc912e (patch)
treee9ddad02013f8a95a993b5ad8ef53cab16e65329 /bench
parent2bb3b6d2bb2cb3cc72ba254b34fadde5319c141a (diff)
Update MatrixConvolutionImageFilter to sk_sp
Diffstat (limited to 'bench')
-rw-r--r--bench/MatrixConvolutionBench.cpp13
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); )