Index: bench/ColorFilterBench.cpp |
diff --git a/bench/ColorFilterBench.cpp b/bench/ColorFilterBench.cpp |
index 5365a9c2ad52082c79de59f2a4ce07490694c3c5..c4ba1e5dcb435e709aa103a9a5d54479c8290dd1 100644 |
--- a/bench/ColorFilterBench.cpp |
+++ b/bench/ColorFilterBench.cpp |
@@ -34,8 +34,8 @@ |
0, 1, 0, 0, amount255, |
0, 0, 1, 0, amount255, |
0, 0, 0, 1, 0 }; |
- SkAutoTUnref<SkColorFilter> filter(SkColorMatrixFilter::Create(matrix)); |
- return SkColorFilterImageFilter::Create(filter, input); |
+ auto filter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix)); |
+ return SkColorFilterImageFilter::Create(filter.get(), input); |
} |
static SkImageFilter* make_grayscale(SkImageFilter* input = nullptr) { |
@@ -45,14 +45,13 @@ |
matrix[1] = matrix[6] = matrix[11] = 0.7152f; |
matrix[2] = matrix[7] = matrix[12] = 0.0722f; |
matrix[18] = 1.0f; |
- SkAutoTUnref<SkColorFilter> filter(SkColorMatrixFilter::Create(matrix)); |
- return SkColorFilterImageFilter::Create(filter, input); |
+ auto filter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix)); |
+ return SkColorFilterImageFilter::Create(filter.get(), input); |
} |
static SkImageFilter* make_mode_blue(SkImageFilter* input = nullptr) { |
- SkAutoTUnref<SkColorFilter> filter( |
- SkColorFilter::CreateModeFilter(SK_ColorBLUE, SkXfermode::kSrcIn_Mode)); |
- return SkColorFilterImageFilter::Create(filter, input); |
+ auto filter(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfermode::kSrcIn_Mode)); |
+ return SkColorFilterImageFilter::Create(filter.get(), input); |
} |
inline bool isSmall() const { return fIsSmall; } |