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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 * is NULL, and if so, treats it as kSrcOver_Mode. | 213 * is NULL, and if so, treats it as kSrcOver_Mode. |
214 */ | 214 */ |
215 static bool AsNewEffectOrCoeff(SkXfermode*, | 215 static bool AsNewEffectOrCoeff(SkXfermode*, |
216 GrEffectRef** effect, | 216 GrEffectRef** effect, |
217 Coeff* src, | 217 Coeff* src, |
218 Coeff* dst, | 218 Coeff* dst, |
219 GrTexture* background = NULL); | 219 GrTexture* background = NULL); |
220 | 220 |
221 SkDEVCODE(virtual void toString(SkString* str) const = 0;) | 221 SkDEVCODE(virtual void toString(SkString* str) const = 0;) |
222 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 222 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
| 223 SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) |
| 224 |
223 protected: | 225 protected: |
224 SkXfermode(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {} | 226 SkXfermode(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {} |
225 | 227 |
226 /** The default implementation of xfer32/xfer16/xferA8 in turn call this | 228 /** The default implementation of xfer32/xfer16/xferA8 in turn call this |
227 method, 1 color at a time (upscaled to a SkPMColor). The default | 229 method, 1 color at a time (upscaled to a SkPMColor). The default |
228 implmentation of this method just returns dst. If performance is | 230 implmentation of this method just returns dst. If performance is |
229 important, your subclass should override xfer32/xfer16/xferA8 directly. | 231 important, your subclass should override xfer32/xfer16/xferA8 directly. |
230 | 232 |
231 This method will not be called directly by the client, so it need not | 233 This method will not be called directly by the client, so it need not |
232 be implemented if your subclass has overridden xfer32/xfer16/xferA8 | 234 be implemented if your subclass has overridden xfer32/xfer16/xferA8 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 return fProc; | 281 return fProc; |
280 } | 282 } |
281 | 283 |
282 private: | 284 private: |
283 SkXfermodeProc fProc; | 285 SkXfermodeProc fProc; |
284 | 286 |
285 typedef SkXfermode INHERITED; | 287 typedef SkXfermode INHERITED; |
286 }; | 288 }; |
287 | 289 |
288 #endif | 290 #endif |
OLD | NEW |