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 /gm/matrixconvolution.cpp | |
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 'gm/matrixconvolution.cpp')
-rw-r--r-- | gm/matrixconvolution.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gm/matrixconvolution.cpp b/gm/matrixconvolution.cpp index b02f743f29..153f7a530a 100644 --- a/gm/matrixconvolution.cpp +++ b/gm/matrixconvolution.cpp @@ -58,17 +58,15 @@ protected: SkISize kernelSize = SkISize::Make(3, 3); SkScalar gain = 0.3f, bias = SkIntToScalar(100); SkPaint paint; - SkAutoTUnref<SkImageFilter> filter( - SkMatrixConvolutionImageFilter::Create(kernelSize, - kernel, - gain, - bias, - kernelOffset, - tileMode, - convolveAlpha, - nullptr, - cropRect)); - paint.setImageFilter(filter); + paint.setImageFilter(SkMatrixConvolutionImageFilter::Make(kernelSize, + kernel, + gain, + bias, + kernelOffset, + tileMode, + convolveAlpha, + nullptr, + cropRect)); canvas->save(); canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); canvas->clipRect(SkRect::MakeWH(SkIntToScalar(fBitmap.width()), |