OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkXfermode_DEFINED | 10 #ifndef SkXfermode_DEFINED |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 */ | 208 */ |
209 static bool asFragmentProcessorOrCoeff(SkXfermode*, GrFragmentProcessor**, C
oeff* src, | 209 static bool asFragmentProcessorOrCoeff(SkXfermode*, GrFragmentProcessor**, C
oeff* src, |
210 Coeff* dst, GrTexture* background = N
ULL); | 210 Coeff* dst, GrTexture* background = N
ULL); |
211 | 211 |
212 SK_TO_STRING_PUREVIRT() | 212 SK_TO_STRING_PUREVIRT() |
213 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 213 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
214 SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) | 214 SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) |
215 | 215 |
216 protected: | 216 protected: |
217 SkXfermode() {} | 217 SkXfermode() {} |
218 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | |
219 explicit SkXfermode(SkReadBuffer& rb) : SkFlattenable(rb) {} | |
220 #endif | |
221 | |
222 /** The default implementation of xfer32/xfer16/xferA8 in turn call this | 218 /** The default implementation of xfer32/xfer16/xferA8 in turn call this |
223 method, 1 color at a time (upscaled to a SkPMColor). The default | 219 method, 1 color at a time (upscaled to a SkPMColor). The default |
224 implmentation of this method just returns dst. If performance is | 220 implmentation of this method just returns dst. If performance is |
225 important, your subclass should override xfer32/xfer16/xferA8 directly. | 221 important, your subclass should override xfer32/xfer16/xferA8 directly. |
226 | 222 |
227 This method will not be called directly by the client, so it need not | 223 This method will not be called directly by the client, so it need not |
228 be implemented if your subclass has overridden xfer32/xfer16/xferA8 | 224 be implemented if your subclass has overridden xfer32/xfer16/xferA8 |
229 */ | 225 */ |
230 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; | 226 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; |
231 | 227 |
232 private: | 228 private: |
233 enum { | 229 enum { |
234 kModeCount = kLastMode + 1 | 230 kModeCount = kLastMode + 1 |
235 }; | 231 }; |
236 | 232 |
237 typedef SkFlattenable INHERITED; | 233 typedef SkFlattenable INHERITED; |
238 }; | 234 }; |
239 | 235 |
240 #endif | 236 #endif |
OLD | NEW |