| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 SkSpecialImage* filterImage(SkSpecialImage* src, const Context&, SkIPoint* o
ffset) const; | 153 SkSpecialImage* filterImage(SkSpecialImage* src, const Context&, SkIPoint* o
ffset) const; |
| 154 | 154 |
| 155 enum MapDirection { | 155 enum MapDirection { |
| 156 kForward_MapDirection, | 156 kForward_MapDirection, |
| 157 kReverse_MapDirection | 157 kReverse_MapDirection |
| 158 }; | 158 }; |
| 159 /** | 159 /** |
| 160 * Map a device-space rect recursively forward or backward through the | 160 * Map a device-space rect recursively forward or backward through the |
| 161 * filter DAG. kForward_MapDirection is used to determine which pixels of | 161 * filter DAG. kForward_MapDirection is used to determine which pixels of |
| 162 * the destination canvas a source image rect would touch after filtering. | 162 * the destination canvas a source image rect would touch after filtering. |
| 163 * kBackward_MapDirection is used to determine which rect of the source | 163 * kReverse_MapDirection is used to determine which rect of the source |
| 164 * image would be required to fill the given rect (typically, clip bounds). | 164 * image would be required to fill the given rect (typically, clip bounds). |
| 165 * Used for clipping and temp-buffer allocations, so the result need not | 165 * Used for clipping and temp-buffer allocations, so the result need not |
| 166 * be exact, but should never be smaller than the real answer. The default | 166 * be exact, but should never be smaller than the real answer. The default |
| 167 * implementation recursively unions all input bounds, or returns false if | 167 * implementation recursively unions all input bounds, or returns false if |
| 168 * no inputs. | 168 * no inputs. |
| 169 */ | 169 */ |
| 170 bool filterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst, | 170 bool filterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst, |
| 171 MapDirection = kReverse_MapDirection) const; | 171 MapDirection = kReverse_MapDirection) const; |
| 172 | 172 |
| 173 /** | 173 /** |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 */ | 479 */ |
| 480 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ | 480 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ |
| 481 Common localVar; \ | 481 Common localVar; \ |
| 482 do { \ | 482 do { \ |
| 483 if (!localVar.unflatten(buffer, expectedCount)) { \ | 483 if (!localVar.unflatten(buffer, expectedCount)) { \ |
| 484 return NULL; \ | 484 return NULL; \ |
| 485 } \ | 485 } \ |
| 486 } while (0) | 486 } while (0) |
| 487 | 487 |
| 488 #endif | 488 #endif |
| OLD | NEW |