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

Unified Diff: include/effects/SkBlurImageFilter.h

Issue 2255803003: Moving SkBlurImageFilter into core (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: ... made req changes onto correct branch 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 9bfa19b8758c6785ff23ef0c7552ceb04782dacd..e2109d05616af3e88bbb550e134f616b159c34f3 100644
--- a/include/effects/SkBlurImageFilter.h
+++ b/include/effects/SkBlurImageFilter.h
@@ -9,40 +9,23 @@
#define SkBlurImageFilter_DEFINED
#include "SkImageFilter.h"
-#include "SkSize.h"
-class SK_API SkBlurImageFilter : public SkImageFilter {
+class SK_API SkBlurImageFilter {
public:
static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY,
sk_sp<SkImageFilter> input,
- const CropRect* cropRect = nullptr);
-
- SkRect computeFastBounds(const SkRect&) const override;
-
- SK_TO_STRING_OVERRIDE()
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter)
+ const SkImageFilter::CropRect* cropRect = nullptr) {
+ return SkImageFilter::MakeBlur(sigmaX, sigmaY, input, cropRect);
+ }
#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();
+ static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY,
+ SkImageFilter * input = nullptr,
+ const SkImageFilter::CropRect* cropRect = nullptr) {
+ return SkImageFilter::MakeBlur(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