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 void computeFastBounds(const SkRect& src, SkRect* dst) const override; | 18 SkRect computeFastBounds(const SkRect& src) const override; |
19 void onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm, | 19 SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix&, MapDirection
) const override; |
20 SkIRect* dst, MapDirection) const override; | |
21 | 20 |
22 /** | 21 /** |
23 * All morphology procs have the same signature: src is the source buffer, d
st the | 22 * All morphology procs have the same signature: src is the source buffer, d
st the |
24 * destination buffer, radius is the morphology radius, width and height are
the bounds | 23 * destination buffer, radius is the morphology radius, width and height are
the bounds |
25 * of the destination buffer (in pixels), and srcStride and dstStride are th
e | 24 * of the destination buffer (in pixels), and srcStride and dstStride are th
e |
26 * number of pixels per row in each buffer. All buffers are 8888. | 25 * number of pixels per row in each buffer. All buffers are 8888. |
27 */ | 26 */ |
28 | 27 |
29 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, | 28 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, |
30 int width, int height, int srcStride, int dstStride); | 29 int width, int height, int srcStride, int dstStride); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 100 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) |
102 | 101 |
103 private: | 102 private: |
104 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
pRect* cropRect) | 103 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
pRect* cropRect) |
105 : INHERITED(radiusX, radiusY, input, cropRect) {} | 104 : INHERITED(radiusX, radiusY, input, cropRect) {} |
106 | 105 |
107 typedef SkMorphologyImageFilter INHERITED; | 106 typedef SkMorphologyImageFilter INHERITED; |
108 }; | 107 }; |
109 | 108 |
110 #endif | 109 #endif |
OLD | NEW |