OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkBlurMask_DEFINED | 10 #ifndef SkBlurMask_DEFINED |
(...skipping 12 matching lines...) Expand all Loading... |
23 kStyleCount | 23 kStyleCount |
24 }; | 24 }; |
25 | 25 |
26 enum Quality { | 26 enum Quality { |
27 kLow_Quality, //!< box blur | 27 kLow_Quality, //!< box blur |
28 kHigh_Quality //!< three pass box blur (similar to gaussian) | 28 kHigh_Quality //!< three pass box blur (similar to gaussian) |
29 }; | 29 }; |
30 | 30 |
31 static bool BlurRect(SkMask *dst, const SkRect &src, | 31 static bool BlurRect(SkMask *dst, const SkRect &src, |
32 SkScalar radius, Style style, | 32 SkScalar radius, Style style, |
33 SkIPoint *margin = NULL); | 33 SkIPoint *margin = NULL, bool perform_blur=true); |
34 static bool Blur(SkMask* dst, const SkMask& src, | 34 static bool Blur(SkMask* dst, const SkMask& src, |
35 SkScalar radius, Style style, Quality quality, | 35 SkScalar radius, Style style, Quality quality, |
36 SkIPoint* margin = NULL); | 36 SkIPoint* margin = NULL); |
37 static bool BlurSeparable(SkMask* dst, const SkMask& src, | 37 static bool BlurSeparable(SkMask* dst, const SkMask& src, |
38 SkScalar radius, Style style, Quality quality, | 38 SkScalar radius, Style style, Quality quality, |
39 SkIPoint* margin = NULL); | 39 SkIPoint* margin = NULL); |
40 | 40 |
41 | 41 |
42 // the "ground truth" blur does a gaussian convolution; it's slow | 42 // the "ground truth" blur does a gaussian convolution; it's slow |
43 // but useful for comparison purposes. | 43 // but useful for comparison purposes. |
44 | 44 |
45 static bool BlurGroundTruth(SkMask* dst, const SkMask& src, | 45 static bool BlurGroundTruth(SkMask* dst, const SkMask& src, |
46 SkScalar provided_radius, Style style, | 46 SkScalar provided_radius, Style style, |
47 SkIPoint* margin = NULL); | 47 SkIPoint* margin = NULL); |
48 | 48 |
49 private: | 49 private: |
50 static bool Blur(SkMask* dst, const SkMask& src, | 50 static bool Blur(SkMask* dst, const SkMask& src, |
51 SkScalar radius, Style style, Quality quality, | 51 SkScalar radius, Style style, Quality quality, |
52 SkIPoint* margin, bool separable); | 52 SkIPoint* margin, bool separable); |
53 }; | 53 }; |
54 | 54 |
55 #endif | 55 #endif |
OLD | NEW |