| Index: src/core/SkLocalMatrixImageFilter.cpp
|
| diff --git a/src/core/SkLocalMatrixImageFilter.cpp b/src/core/SkLocalMatrixImageFilter.cpp
|
| index 15f2f0ef007cbc91ce713897b1f013e97d523cd8..d1b5715b7fe19c541aaad6e04bbe5f21ce80827d 100644
|
| --- a/src/core/SkLocalMatrixImageFilter.cpp
|
| +++ b/src/core/SkLocalMatrixImageFilter.cpp
|
| @@ -10,21 +10,9 @@
|
| #include "SkSpecialImage.h"
|
| #include "SkString.h"
|
|
|
| -SkImageFilter* SkLocalMatrixImageFilter::Create(const SkMatrix& localM, SkImageFilter* input) {
|
| - if (!input) {
|
| - return nullptr;
|
| - }
|
| - if (localM.getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)) {
|
| - return nullptr;
|
| - }
|
| - if (localM.isIdentity()) {
|
| - return SkRef(input);
|
| - }
|
| - return new SkLocalMatrixImageFilter(localM, input);
|
| -}
|
| -
|
| -SkLocalMatrixImageFilter::SkLocalMatrixImageFilter(const SkMatrix& localM, SkImageFilter* input)
|
| - : INHERITED(1, &input)
|
| +SkLocalMatrixImageFilter::SkLocalMatrixImageFilter(const SkMatrix& localM,
|
| + sk_sp<SkImageFilter> input)
|
| + : INHERITED(&input, 1, nullptr)
|
| , fLocalM(localM) {
|
| }
|
|
|
| @@ -32,7 +20,8 @@ SkFlattenable* SkLocalMatrixImageFilter::CreateProc(SkReadBuffer& buffer) {
|
| SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
|
| SkMatrix lm;
|
| buffer.readMatrix(&lm);
|
| - return SkLocalMatrixImageFilter::Create(lm, common.getInput(0));
|
| + return SkLocalMatrixImageFilter::Make(lm,
|
| + sk_ref_sp<SkImageFilter>(common.getInput(0))).release();
|
| }
|
|
|
| void SkLocalMatrixImageFilter::flatten(SkWriteBuffer& buffer) const {
|
|
|