| 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 void computeFastBounds(const SkRect& src, SkRect* dst) const override; |
| 19 bool onFilterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst) c
onst override; | 19 void onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm, |
| 20 SkIRect* dst, MapDirection) const 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 101 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) |
| 101 | 102 |
| 102 private: | 103 private: |
| 103 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
pRect* cropRect) | 104 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
pRect* cropRect) |
| 104 : INHERITED(radiusX, radiusY, input, cropRect) {} | 105 : INHERITED(radiusX, radiusY, input, cropRect) {} |
| 105 | 106 |
| 106 typedef SkMorphologyImageFilter INHERITED; | 107 typedef SkMorphologyImageFilter INHERITED; |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 #endif | 110 #endif |
| OLD | NEW |