| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 SkColorFilter_DEFINED | 8 #ifndef SkColorFilter_DEFINED |
| 9 #define SkColorFilter_DEFINED | 9 #define SkColorFilter_DEFINED |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 If the Mode is DST, this function will return NULL (since that | 99 If the Mode is DST, this function will return NULL (since that |
| 100 mode will have no effect on the result). | 100 mode will have no effect on the result). |
| 101 @param c The source color used with the specified mode | 101 @param c The source color used with the specified mode |
| 102 @param mode The xfermode mode that is applied to each color in | 102 @param mode The xfermode mode that is applied to each color in |
| 103 the colorfilter's filterSpan[16,32] methods | 103 the colorfilter's filterSpan[16,32] methods |
| 104 @return colorfilter object that applies the src color and mode, | 104 @return colorfilter object that applies the src color and mode, |
| 105 or NULL if the mode will have no effect. | 105 or NULL if the mode will have no effect. |
| 106 */ | 106 */ |
| 107 static SkColorFilter* CreateModeFilter(SkColor c, SkXfermode::Mode mode); | 107 static SkColorFilter* CreateModeFilter(SkColor c, SkXfermode::Mode mode); |
| 108 | 108 |
| 109 /** Create a colorfilter that multiplies the RGB channels by one color, and | 109 // DEPRECATED -- call this from SkColorMatrixFilter instead -- see skbug.com
/4791 |
| 110 then adds a second color, pinning the result for each component to | |
| 111 [0..255]. The alpha components of the mul and add arguments | |
| 112 are ignored. | |
| 113 */ | |
| 114 static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add); | 110 static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add); |
| 115 | 111 |
| 116 /** Construct a colorfilter whose effect is to first apply the inner filter
and then apply | 112 /** Construct a colorfilter whose effect is to first apply the inner filter
and then apply |
| 117 * the outer filter to the result of the inner's. | 113 * the outer filter to the result of the inner's. |
| 118 * The reference counts for outer and inner are incremented. | 114 * The reference counts for outer and inner are incremented. |
| 119 * | 115 * |
| 120 * Due to internal limits, it is possible that this will return NULL, so th
e caller must | 116 * Due to internal limits, it is possible that this will return NULL, so th
e caller must |
| 121 * always check. | 117 * always check. |
| 122 */ | 118 */ |
| 123 static SkColorFilter* CreateComposeFilter(SkColorFilter* outer, SkColorFilte
r* inner); | 119 static SkColorFilter* CreateComposeFilter(SkColorFilter* outer, SkColorFilte
r* inner); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 * | 151 * |
| 156 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 | 152 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 |
| 157 */ | 153 */ |
| 158 virtual int privateComposedFilterCount() const { return 1; } | 154 virtual int privateComposedFilterCount() const { return 1; } |
| 159 friend class SkComposeColorFilter; | 155 friend class SkComposeColorFilter; |
| 160 | 156 |
| 161 typedef SkFlattenable INHERITED; | 157 typedef SkFlattenable INHERITED; |
| 162 }; | 158 }; |
| 163 | 159 |
| 164 #endif | 160 #endif |
| OLD | NEW |