| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 230 |
| 231 private: | 231 private: |
| 232 CropRect fCropRect; | 232 CropRect fCropRect; |
| 233 // most filters accept at most 2 input-filters | 233 // most filters accept at most 2 input-filters |
| 234 SkAutoSTArray<2, SkImageFilter*> fInputs; | 234 SkAutoSTArray<2, SkImageFilter*> fInputs; |
| 235 uint32_t fUniqueID; | 235 uint32_t fUniqueID; |
| 236 | 236 |
| 237 void allocInputs(int count); | 237 void allocInputs(int count); |
| 238 }; | 238 }; |
| 239 | 239 |
| 240 SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRe
ct = NULL); | 240 SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRe
ct = NULL, uint32_t uniqueID = 0); |
| 241 | 241 |
| 242 virtual ~SkImageFilter(); | 242 virtual ~SkImageFilter(); |
| 243 | 243 |
| 244 /** | 244 /** |
| 245 * Constructs a new SkImageFilter read from an SkReadBuffer object. | 245 * Constructs a new SkImageFilter read from an SkReadBuffer object. |
| 246 * | 246 * |
| 247 * @param inputCount The exact number of inputs expected for this SkImag
eFilter object. | 247 * @param inputCount The exact number of inputs expected for this SkImag
eFilter object. |
| 248 * -1 can be used if the filter accepts any number of
inputs. | 248 * -1 can be used if the filter accepts any number of
inputs. |
| 249 * @param rb SkReadBuffer object from which the SkImageFilter is
read. | 249 * @param rb SkReadBuffer object from which the SkImageFilter is
read. |
| 250 */ | 250 */ |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 */ | 335 */ |
| 336 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ | 336 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ |
| 337 Common localVar; \ | 337 Common localVar; \ |
| 338 do { \ | 338 do { \ |
| 339 if (!localVar.unflatten(buffer, expectedCount)) { \ | 339 if (!localVar.unflatten(buffer, expectedCount)) { \ |
| 340 return NULL; \ | 340 return NULL; \ |
| 341 } \ | 341 } \ |
| 342 } while (0) | 342 } while (0) |
| 343 | 343 |
| 344 #endif | 344 #endif |
| OLD | NEW |