Index: src/effects/SkTestImageFilters.cpp |
diff --git a/src/effects/SkTestImageFilters.cpp b/src/effects/SkTestImageFilters.cpp |
index 5cc890c8487928aa0395a621cf3b4d1052805311..208053b90edf00eefcd2c997a8d830d198a43bb6 100755 |
--- a/src/effects/SkTestImageFilters.cpp |
+++ b/src/effects/SkTestImageFilters.cpp |
@@ -14,6 +14,17 @@ |
/////////////////////////////////////////////////////////////////////////////// |
+sk_sp<SkImageFilter> SkDownSampleImageFilter::Make(SkScalar scale, sk_sp<SkImageFilter> input) { |
+ if (!SkScalarIsFinite(scale)) { |
+ return nullptr; |
+ } |
+ // we don't support scale in this range |
+ if (scale > SK_Scalar1 || scale <= 0) { |
+ return nullptr; |
+ } |
+ return sk_sp<SkImageFilter>(new SkDownSampleImageFilter(scale, std::move(input))); |
+} |
+ |
sk_sp<SkSpecialImage> SkDownSampleImageFilter::onFilterImage(SkSpecialImage* source, |
const Context& ctx, |
SkIPoint* offset) const { |