| Index: src/core/SkLocalMatrixImageFilter.cpp
|
| diff --git a/src/core/SkLocalMatrixImageFilter.cpp b/src/core/SkLocalMatrixImageFilter.cpp
|
| index 42acee0c221b5614fa02a6cb16068ee2fea22e0e..b4d5bb2741ead830612b99463719ac1d7cd27599 100644
|
| --- a/src/core/SkLocalMatrixImageFilter.cpp
|
| +++ b/src/core/SkLocalMatrixImageFilter.cpp
|
| @@ -10,6 +10,20 @@
|
| #include "SkSpecialImage.h"
|
| #include "SkString.h"
|
|
|
| +sk_sp<SkImageFilter> SkLocalMatrixImageFilter::Make(const SkMatrix& localM,
|
| + sk_sp<SkImageFilter> input) {
|
| + if (!input) {
|
| + return nullptr;
|
| + }
|
| + if (localM.getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)) {
|
| + return nullptr;
|
| + }
|
| + if (localM.isIdentity()) {
|
| + return input;
|
| + }
|
| + return sk_sp<SkImageFilter>(new SkLocalMatrixImageFilter(localM, input));
|
| +}
|
| +
|
| SkLocalMatrixImageFilter::SkLocalMatrixImageFilter(const SkMatrix& localM,
|
| sk_sp<SkImageFilter> input)
|
| : INHERITED(&input, 1, nullptr)
|
|
|