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

Side by Side 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 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"
13 12
14 class SK_API SkBlurImageFilter : public SkImageFilter { 13 class SK_API SkBlurImageFilter {
15 public: 14 public:
16 static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY, 15 static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY,
17 sk_sp<SkImageFilter> input, 16 sk_sp<SkImageFilter> input,
18 const CropRect* cropRect = nullptr); 17 const SkImageFilter::CropRect* cropRect = n ullptr) {
19 18 return SkImageFilter::MakeBlur(sigmaX, sigmaY, input, cropRect);
20 SkRect computeFastBounds(const SkRect&) const override; 19 }
21
22 SK_TO_STRING_OVERRIDE()
23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter)
24 20
25 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR 21 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
26 static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter * input = nullptr, 22 static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY,
27 const CropRect* cropRect = nullptr) { 23 SkImageFilter * input = nullptr,
28 return Make(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input), cropRect).r elease(); 24 const SkImageFilter::CropRect* cropRect = nullp tr) {
25 return SkImageFilter::MakeBlur(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>( input),
26 cropRect).release();
29 } 27 }
30 #endif 28 #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;
46 }; 29 };
47 30
48 #endif 31 #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