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

Side by Side 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, 3 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 unified diff | Download patch
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkBlurImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The Android Open Source Project 2 * Copyright 2011 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkBlurImageFilter_DEFINED 8 #ifndef SkBlurImageFilter_DEFINED
9 #define SkBlurImageFilter_DEFINED 9 #define SkBlurImageFilter_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 #include "SkSize.h"
12 13
13 class SK_API SkBlurImageFilter { 14 class SK_API SkBlurImageFilter : public SkImageFilter {
14 public: 15 public:
15 static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY, 16 static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY,
16 sk_sp<SkImageFilter> input, 17 sk_sp<SkImageFilter> input,
17 const SkImageFilter::CropRect* cropRect = n ullptr) { 18 const CropRect* cropRect = nullptr);
18 return SkImageFilter::MakeBlur(sigmaX, sigmaY, input, cropRect); 19
20 SkRect computeFastBounds(const SkRect&) const override;
21
22 SK_TO_STRING_OVERRIDE()
23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter)
24
25 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
26 static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter * input = nullptr,
27 const CropRect* cropRect = nullptr) {
28 return Make(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input), cropRect).r elease();
19 } 29 }
30 #endif
31
32 protected:
33 void flatten(SkWriteBuffer&) const override;
34 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
35 SkIPoint* offset) const override;
36 SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix&, MapDirection ) const override;
37
38 private:
39 SkBlurImageFilter(SkScalar sigmaX,
40 SkScalar sigmaY,
41 sk_sp<SkImageFilter> input,
42 const CropRect* cropRect);
43
44 SkSize fSigma;
45 typedef SkImageFilter INHERITED;
20 }; 46 };
21 47
22 #endif 48 #endif
OLDNEW
« 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