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

Side by Side Diff: include/effects/SkBlurImageFilter.h

Issue 1893973002: Outline SkImageFilter Make methods (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 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 | « no previous file | include/effects/SkComposeImageFilter.h » ('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 #include "SkSize.h"
13 13
14 class SK_API SkBlurImageFilter : public SkImageFilter { 14 class SK_API SkBlurImageFilter : public SkImageFilter {
15 public: 15 public:
16 static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY, sk_sp<SkI mageFilter> input, 16 static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY,
17 const CropRect* cropRect = nullptr) { 17 sk_sp<SkImageFilter> input,
18 if (0 == sigmaX && 0 == sigmaY && nullptr == cropRect) { 18 const CropRect* cropRect = nullptr);
19 return input;
20 }
21 return sk_sp<SkImageFilter>(new SkBlurImageFilter(sigmaX, sigmaY, input, cropRect));
22 }
23 19
24 SkRect computeFastBounds(const SkRect&) const override; 20 SkRect computeFastBounds(const SkRect&) const override;
25 21
26 SK_TO_STRING_OVERRIDE() 22 SK_TO_STRING_OVERRIDE()
27 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter) 23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter)
28 24
29 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR 25 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
30 static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter * input = nullptr, 26 static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter * input = nullptr,
31 const CropRect* cropRect = nullptr) { 27 const CropRect* cropRect = nullptr) {
32 return Make(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input), cropRect).r elease(); 28 return Make(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input), cropRect).r elease();
(...skipping 10 matching lines...) Expand all
43 SkBlurImageFilter(SkScalar sigmaX, 39 SkBlurImageFilter(SkScalar sigmaX,
44 SkScalar sigmaY, 40 SkScalar sigmaY,
45 sk_sp<SkImageFilter> input, 41 sk_sp<SkImageFilter> input,
46 const CropRect* cropRect); 42 const CropRect* cropRect);
47 43
48 SkSize fSigma; 44 SkSize fSigma;
49 typedef SkImageFilter INHERITED; 45 typedef SkImageFilter INHERITED;
50 }; 46 };
51 47
52 #endif 48 #endif
OLDNEW
« no previous file with comments | « no previous file | include/effects/SkComposeImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698