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 | 20 |
20 /** | 21 /** |
21 * 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 |
22 * 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 |
23 * 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 |
24 * 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. |
25 */ | 26 */ |
26 | 27 |
27 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, | 28 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, |
28 int width, int height, int srcStride, int dstStride); | 29 int width, int height, int srcStride, int dstStride); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 88 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) |
88 | 89 |
89 protected: | 90 protected: |
90 SkErodeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {} | 91 SkErodeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {} |
91 | 92 |
92 private: | 93 private: |
93 typedef SkMorphologyImageFilter INHERITED; | 94 typedef SkMorphologyImageFilter INHERITED; |
94 }; | 95 }; |
95 | 96 |
96 #endif | 97 #endif |
OLD | NEW |