Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: bench/MatrixConvolutionBench.cpp

Issue 1869833002: Update MatrixConvolutionImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fuzz/FilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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); )
« no previous file with comments | « no previous file | fuzz/FilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698