OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 #ifndef SkImageFilter_DEFINED | 8 #ifndef SkImageFilter_DEFINED |
9 #define SkImageFilter_DEFINED | 9 #define SkImageFilter_DEFINED |
10 | 10 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRe
ct = NULL); | 149 SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRe
ct = NULL); |
150 | 150 |
151 // Convenience constructor for 1-input filters. | 151 // Convenience constructor for 1-input filters. |
152 explicit SkImageFilter(SkImageFilter* input, const CropRect* cropRect = NULL
); | 152 explicit SkImageFilter(SkImageFilter* input, const CropRect* cropRect = NULL
); |
153 | 153 |
154 // Convenience constructor for 2-input filters. | 154 // Convenience constructor for 2-input filters. |
155 SkImageFilter(SkImageFilter* input1, SkImageFilter* input2, const CropRect*
cropRect = NULL); | 155 SkImageFilter(SkImageFilter* input1, SkImageFilter* input2, const CropRect*
cropRect = NULL); |
156 | 156 |
157 virtual ~SkImageFilter(); | 157 virtual ~SkImageFilter(); |
158 | 158 |
159 explicit SkImageFilter(int maxInputCount, SkFlattenableReadBuffer& rb); | 159 /** |
| 160 * Constructs a new SkImageFilter read from an SkFlattenableReadBuffer obje
ct. |
| 161 * |
| 162 * @param inputCount The exact number of inputs expected for this SkImag
eFilter object. |
| 163 * -1 can be used if the filter accepts any number of
inputs. |
| 164 * @param rb SkFlattenableReadBuffer object from which the SkIma
geFilter is read. |
| 165 */ |
| 166 explicit SkImageFilter(int inputCount, SkFlattenableReadBuffer& rb); |
160 | 167 |
161 virtual void flatten(SkFlattenableWriteBuffer& wb) const SK_OVERRIDE; | 168 virtual void flatten(SkFlattenableWriteBuffer& wb) const SK_OVERRIDE; |
162 | 169 |
163 // Default impl returns false | 170 // Default impl returns false |
164 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, | 171 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
165 SkBitmap* result, SkIPoint* offset); | 172 SkBitmap* result, SkIPoint* offset); |
166 // Default impl copies src into dst and returns true | 173 // Default impl copies src into dst and returns true |
167 virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*); | 174 virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*); |
168 | 175 |
169 // Applies "matrix" to the crop rect, and sets "rect" to the intersection of | 176 // Applies "matrix" to the crop rect, and sets "rect" to the intersection of |
(...skipping 22 matching lines...) Expand all Loading... |
192 const SkIRect& bounds) const; | 199 const SkIRect& bounds) const; |
193 | 200 |
194 private: | 201 private: |
195 typedef SkFlattenable INHERITED; | 202 typedef SkFlattenable INHERITED; |
196 int fInputCount; | 203 int fInputCount; |
197 SkImageFilter** fInputs; | 204 SkImageFilter** fInputs; |
198 CropRect fCropRect; | 205 CropRect fCropRect; |
199 }; | 206 }; |
200 | 207 |
201 #endif | 208 #endif |
OLD | NEW |