Index: include/effects/SkBlurImageFilter.h |
diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h |
index 085a13b5b328a9ea9940e50702454321fe4e6ce9..9bfa19b8758c6785ff23ef0c7552ceb04782dacd 100644 |
--- a/include/effects/SkBlurImageFilter.h |
+++ b/include/effects/SkBlurImageFilter.h |
@@ -9,14 +9,40 @@ |
#define SkBlurImageFilter_DEFINED |
#include "SkImageFilter.h" |
+#include "SkSize.h" |
-class SK_API SkBlurImageFilter { |
+class SK_API SkBlurImageFilter : public SkImageFilter { |
public: |
static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY, |
sk_sp<SkImageFilter> input, |
- const SkImageFilter::CropRect* cropRect = nullptr) { |
- return SkImageFilter::MakeBlur(sigmaX, sigmaY, input, cropRect); |
+ const CropRect* cropRect = nullptr); |
+ |
+ SkRect computeFastBounds(const SkRect&) const override; |
+ |
+ SK_TO_STRING_OVERRIDE() |
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter) |
+ |
+#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR |
+ static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter* input = nullptr, |
+ const CropRect* cropRect = nullptr) { |
+ return Make(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input), cropRect).release(); |
} |
+#endif |
+ |
+protected: |
+ void flatten(SkWriteBuffer&) const override; |
+ sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, |
+ SkIPoint* offset) const override; |
+ SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix&, MapDirection) const override; |
+ |
+private: |
+ SkBlurImageFilter(SkScalar sigmaX, |
+ SkScalar sigmaY, |
+ sk_sp<SkImageFilter> input, |
+ const CropRect* cropRect); |
+ |
+ SkSize fSigma; |
+ typedef SkImageFilter INHERITED; |
}; |
#endif |