OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 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 | 8 |
9 #ifndef SkMorphologyImageFilter_DEFINED | 9 #ifndef SkMorphologyImageFilter_DEFINED |
10 #define SkMorphologyImageFilter_DEFINED | 10 #define SkMorphologyImageFilter_DEFINED |
11 | 11 |
12 #include "SkColor.h" | 12 #include "SkColor.h" |
13 #include "SkImageFilter.h" | 13 #include "SkImageFilter.h" |
14 #include "SkSize.h" | 14 #include "SkSize.h" |
15 | 15 |
16 class SK_API SkMorphologyImageFilter : public SkImageFilter { | 16 class SK_API SkMorphologyImageFilter : public SkImageFilter { |
17 public: | 17 public: |
18 SkMorphologyImageFilter(int radiusX, int radiusY, SkImageFilter* input, cons
t CropRect* cropRect); | 18 SkMorphologyImageFilter(int radiusX, int radiusY, SkImageFilter* input, cons
t CropRect* cropRect); |
19 virtual void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVER
RIDE; | 19 virtual void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVER
RIDE; |
| 20 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect
* dst) const SK_OVERRIDE; |
20 | 21 |
21 /** | 22 /** |
22 * All morphology procs have the same signature: src is the source buffer, d
st the | 23 * All morphology procs have the same signature: src is the source buffer, d
st the |
23 * destination buffer, radius is the morphology radius, width and height are
the bounds | 24 * destination buffer, radius is the morphology radius, width and height are
the bounds |
24 * of the destination buffer (in pixels), and srcStride and dstStride are th
e | 25 * of the destination buffer (in pixels), and srcStride and dstStride are th
e |
25 * number of pixels per row in each buffer. All buffers are 8888. | 26 * number of pixels per row in each buffer. All buffers are 8888. |
26 */ | 27 */ |
27 | 28 |
28 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, | 29 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, |
29 int width, int height, int srcStride, int dstStride); | 30 int width, int height, int srcStride, int dstStride); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 89 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) |
89 | 90 |
90 protected: | 91 protected: |
91 SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} | 92 SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} |
92 | 93 |
93 private: | 94 private: |
94 typedef SkMorphologyImageFilter INHERITED; | 95 typedef SkMorphologyImageFilter INHERITED; |
95 }; | 96 }; |
96 | 97 |
97 #endif | 98 #endif |
OLD | NEW |