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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 * array, each of which has been ref'd, so that the caller is responsible f
or calling unref() | 129 * array, each of which has been ref'd, so that the caller is responsible f
or calling unref() |
130 * on them when they are finished. If more than one processor is appended,
they will be | 130 * on them when they are finished. If more than one processor is appended,
they will be |
131 * applied in FIFO order. | 131 * applied in FIFO order. |
132 * | 132 * |
133 * The fragment processor(s) must each return their color as a premul norma
lized value | 133 * The fragment processor(s) must each return their color as a premul norma
lized value |
134 * e.g. each component between [0..1] and each color component <= alpha. | 134 * e.g. each component between [0..1] and each color component <= alpha. |
135 * | 135 * |
136 * If the subclass returns false, then it should not modify the array at al
l. | 136 * If the subclass returns false, then it should not modify the array at al
l. |
137 */ | 137 */ |
138 virtual bool asFragmentProcessors(GrContext*, GrProcessorDataManager*, | 138 virtual bool asFragmentProcessors(GrContext*, GrProcessorDataManager*, |
139 SkTDArray<GrFragmentProcessor*>*) const { | 139 SkTDArray<const GrFragmentProcessor*>*) co
nst { |
140 return false; | 140 return false; |
141 } | 141 } |
142 | 142 |
143 bool affectsTransparentBlack() const { | 143 bool affectsTransparentBlack() const { |
144 return this->filterColor(0) != 0; | 144 return this->filterColor(0) != 0; |
145 } | 145 } |
146 | 146 |
147 SK_TO_STRING_PUREVIRT() | 147 SK_TO_STRING_PUREVIRT() |
148 | 148 |
149 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 149 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
(...skipping 10 matching lines...) Expand all Loading... |
160 * | 160 * |
161 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 | 161 * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 |
162 */ | 162 */ |
163 virtual int privateComposedFilterCount() const { return 1; } | 163 virtual int privateComposedFilterCount() const { return 1; } |
164 friend class SkComposeColorFilter; | 164 friend class SkComposeColorFilter; |
165 | 165 |
166 typedef SkFlattenable INHERITED; | 166 typedef SkFlattenable INHERITED; |
167 }; | 167 }; |
168 | 168 |
169 #endif | 169 #endif |
OLD | NEW |