| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR | 264 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR |
| 265 SkImageFilter* newWithLocalMatrix(const SkMatrix& matrix) const { | 265 SkImageFilter* newWithLocalMatrix(const SkMatrix& matrix) const { |
| 266 return this->makeWithLocalMatrix(matrix).release(); | 266 return this->makeWithLocalMatrix(matrix).release(); |
| 267 } | 267 } |
| 268 #endif | 268 #endif |
| 269 | 269 |
| 270 /** | 270 /** |
| 271 * Create an SkMatrixImageFilter, which transforms its input by the given ma
trix. | 271 * Create an SkMatrixImageFilter, which transforms its input by the given ma
trix. |
| 272 */ | 272 */ |
| 273 static sk_sp<SkImageFilter> MakeMatrixFilter(const SkMatrix& matrix, |
| 274 SkFilterQuality, |
| 275 sk_sp<SkImageFilter> input); |
| 276 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR |
| 273 static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix, | 277 static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix, |
| 274 SkFilterQuality, | 278 SkFilterQuality filterQuality, |
| 275 SkImageFilter* input = NULL); | 279 SkImageFilter* input = nullptr) { |
| 280 return MakeMatrixFilter(matrix, filterQuality, sk_ref_sp<SkImageFilter>(
input)).release(); |
| 281 } |
| 282 #endif |
| 283 |
| 276 | 284 |
| 277 sk_sp<SkSpecialImage> filterInput(int index, | 285 sk_sp<SkSpecialImage> filterInput(int index, |
| 278 SkSpecialImage* src, | 286 SkSpecialImage* src, |
| 279 const Context&, | 287 const Context&, |
| 280 SkIPoint* offset) const; | 288 SkIPoint* offset) const; |
| 281 | 289 |
| 282 #if SK_SUPPORT_GPU | 290 #if SK_SUPPORT_GPU |
| 283 // Helper function which invokes GPU filter processing on the | 291 // Helper function which invokes GPU filter processing on the |
| 284 // input at the specified "index". If the input is null, it leaves | 292 // input at the specified "index". If the input is null, it leaves |
| 285 // "result" and "offset" untouched, and returns true. If the input | 293 // "result" and "offset" untouched, and returns true. If the input |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 */ | 495 */ |
| 488 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ | 496 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ |
| 489 Common localVar; \ | 497 Common localVar; \ |
| 490 do { \ | 498 do { \ |
| 491 if (!localVar.unflatten(buffer, expectedCount)) { \ | 499 if (!localVar.unflatten(buffer, expectedCount)) { \ |
| 492 return NULL; \ | 500 return NULL; \ |
| 493 } \ | 501 } \ |
| 494 } while (0) | 502 } while (0) |
| 495 | 503 |
| 496 #endif | 504 #endif |
| OLD | NEW |