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 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
62 SkBitmap* result, SkIPoint* offset) const SK_OVER
RIDE; | 62 SkBitmap* result, SkIPoint* offset) const SK_OVER
RIDE; |
63 #if SK_SUPPORT_GPU | 63 #if SK_SUPPORT_GPU |
64 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
&, | 64 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
&, |
65 SkBitmap* result, SkIPoint* offset) const SK_OVE
RRIDE; | 65 SkBitmap* result, SkIPoint* offset) const SK_OVE
RRIDE; |
66 #endif | 66 #endif |
67 | 67 |
68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) | 68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) |
69 | 69 |
70 protected: | 70 protected: |
71 SkDilateImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} | |
72 | |
73 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS | |
74 public: | |
75 #endif | |
76 SkDilateImageFilter(int radiusX, int radiusY, | 71 SkDilateImageFilter(int radiusX, int radiusY, |
77 SkImageFilter* input = NULL, | 72 SkImageFilter* input = NULL, |
78 const CropRect* cropRect = NULL) | 73 const CropRect* cropRect = NULL) |
79 : INHERITED(radiusX, radiusY, input, cropRect) {} | 74 : INHERITED(radiusX, radiusY, input, cropRect) {} |
| 75 explicit SkDilateImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} |
80 | 76 |
81 private: | 77 private: |
82 typedef SkMorphologyImageFilter INHERITED; | 78 typedef SkMorphologyImageFilter INHERITED; |
83 }; | 79 }; |
84 | 80 |
85 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { | 81 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { |
86 public: | 82 public: |
87 static SkErodeImageFilter* Create(int radiusX, int radiusY, | 83 static SkErodeImageFilter* Create(int radiusX, int radiusY, |
88 SkImageFilter* input = NULL, | 84 SkImageFilter* input = NULL, |
89 const CropRect* cropRect = NULL) { | 85 const CropRect* cropRect = NULL) { |
90 return SkNEW_ARGS(SkErodeImageFilter, (radiusX, radiusY, input, cropRect
)); | 86 return SkNEW_ARGS(SkErodeImageFilter, (radiusX, radiusY, input, cropRect
)); |
91 } | 87 } |
92 | 88 |
93 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 89 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
94 SkBitmap* result, SkIPoint* offset) const SK_OVER
RIDE; | 90 SkBitmap* result, SkIPoint* offset) const SK_OVER
RIDE; |
95 #if SK_SUPPORT_GPU | 91 #if SK_SUPPORT_GPU |
96 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
&, | 92 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
&, |
97 SkBitmap* result, SkIPoint* offset) const SK_OVE
RRIDE; | 93 SkBitmap* result, SkIPoint* offset) const SK_OVE
RRIDE; |
98 #endif | 94 #endif |
99 | 95 |
100 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 96 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) |
101 | 97 |
102 protected: | 98 protected: |
103 SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} | |
104 | |
105 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS | |
106 public: | |
107 #endif | |
108 SkErodeImageFilter(int radiusX, int radiusY, | 99 SkErodeImageFilter(int radiusX, int radiusY, |
109 SkImageFilter* input = NULL, | 100 SkImageFilter* input = NULL, |
110 const CropRect* cropRect = NULL) | 101 const CropRect* cropRect = NULL) |
111 : INHERITED(radiusX, radiusY, input, cropRect) {} | 102 : INHERITED(radiusX, radiusY, input, cropRect) {} |
| 103 explicit SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} |
112 | 104 |
113 private: | 105 private: |
114 typedef SkMorphologyImageFilter INHERITED; | 106 typedef SkMorphologyImageFilter INHERITED; |
115 }; | 107 }; |
116 | 108 |
117 #endif | 109 #endif |
OLD | NEW |