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 |
11 #include "../private/SkTArray.h" | 11 #include "../private/SkTArray.h" |
12 #include "../private/SkTemplates.h" | 12 #include "../private/SkTemplates.h" |
13 #include "../private/SkMutex.h" | 13 #include "../private/SkMutex.h" |
14 #include "SkFilterQuality.h" | 14 #include "SkFilterQuality.h" |
15 #include "SkFlattenable.h" | 15 #include "SkFlattenable.h" |
16 #include "SkMatrix.h" | 16 #include "SkMatrix.h" |
17 #include "SkRect.h" | 17 #include "SkRect.h" |
18 | 18 |
19 class GrContext; | 19 class GrContext; |
20 class GrFragmentProcessor; | 20 class GrFragmentProcessor; |
21 class SkBaseDevice; | |
22 class SkColorFilter; | 21 class SkColorFilter; |
23 struct SkIPoint; | 22 struct SkIPoint; |
24 class SkSpecialImage; | 23 class SkSpecialImage; |
25 | 24 |
26 /** | 25 /** |
27 * Base class for image filters. If one is installed in the paint, then | 26 * Base class for image filters. If one is installed in the paint, then |
28 * all drawing occurs as usual, but it is as if the drawing happened into an | 27 * all drawing occurs as usual, but it is as if the drawing happened into an |
29 * offscreen (before the xfermode is applied). This offscreen bitmap will | 28 * offscreen (before the xfermode is applied). This offscreen bitmap will |
30 * then be handed to the imagefilter, who in turn creates a new bitmap which | 29 * then be handed to the imagefilter, who in turn creates a new bitmap which |
31 * is what will finally be drawn to the device (using the original xfermode). | 30 * is what will finally be drawn to the device (using the original xfermode). |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 */ | 396 */ |
398 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ | 397 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ |
399 Common localVar; \ | 398 Common localVar; \ |
400 do { \ | 399 do { \ |
401 if (!localVar.unflatten(buffer, expectedCount)) { \ | 400 if (!localVar.unflatten(buffer, expectedCount)) { \ |
402 return NULL; \ | 401 return NULL; \ |
403 } \ | 402 } \ |
404 } while (0) | 403 } while (0) |
405 | 404 |
406 #endif | 405 #endif |
OLD | NEW |