Index: src/effects/SkMorphologyImageFilter.cpp |
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp |
index d0ca20576b381301dc47b06075927d55fe6a7fa0..1f22a6e19453480bb70417e464fd19c216d13308 100644 |
--- a/src/effects/SkMorphologyImageFilter.cpp |
+++ b/src/effects/SkMorphologyImageFilter.cpp |
@@ -28,6 +28,29 @@ |
#include "glsl/GrGLSLUniformHandler.h" |
#endif |
+sk_sp<SkImageFilter> SkDilateImageFilter::Make(int radiusX, int radiusY, |
+ sk_sp<SkImageFilter> input, |
+ const CropRect* cropRect) { |
+ if (radiusX < 0 || radiusY < 0) { |
+ return nullptr; |
+ } |
+ return sk_sp<SkImageFilter>(new SkDilateImageFilter(radiusX, radiusY, |
+ std::move(input), |
+ cropRect)); |
+} |
+ |
+ |
+sk_sp<SkImageFilter> SkErodeImageFilter::Make(int radiusX, int radiusY, |
+ sk_sp<SkImageFilter> input, |
+ const CropRect* cropRect) { |
+ if (radiusX < 0 || radiusY < 0) { |
+ return nullptr; |
+ } |
+ return sk_sp<SkImageFilter>(new SkErodeImageFilter(radiusX, radiusY, |
+ std::move(input), |
+ cropRect)); |
+} |
+ |
SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, |
int radiusY, |
sk_sp<SkImageFilter> input, |