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 /samplecode | |
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 'samplecode')
-rw-r--r-- | samplecode/SampleFilterFuzz.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp index a7f4163b27..f09c6a57a0 100644 --- a/samplecode/SampleFilterFuzz.cpp +++ b/samplecode/SampleFilterFuzz.cpp @@ -555,7 +555,7 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) { filter = SkAlphaThresholdFilter::Make(make_region(), make_scalar(), make_scalar(), - nullptr); + make_image_filter()); break; case MERGE: filter = SkMergeImageFilter::Make(make_image_filter(), @@ -614,18 +614,16 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) { } SkIPoint kernelOffset = SkIPoint::Make(R(SkIntToScalar(size.width())), R(SkIntToScalar(size.height()))); - sk_sp<SkImageFilter> subFilter(make_image_filter()); - filter = sk_sp<SkImageFilter>(SkMatrixConvolutionImageFilter::Create( - size, - kernel.begin(), - make_scalar(), - make_scalar(), - kernelOffset, - (SkMatrixConvolutionImageFilter::TileMode)R(3), - R(2) == 1, - subFilter.get(), - &cropR)); + filter = SkMatrixConvolutionImageFilter::Make(size, + kernel.begin(), + make_scalar(), + make_scalar(), + kernelOffset, + (SkMatrixConvolutionImageFilter::TileMode)R(3), + R(2) == 1, + make_image_filter(), + &cropR); break; } case COMPOSE: |