Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: include/effects/SkBlurImageFilter.h

Issue 2274603003: Revert of Moving SkBlurImageFilter into core (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkBlurImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698