| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 GrEffectRef** effect, | 211 GrEffectRef** effect, |
| 212 Coeff* src, | 212 Coeff* src, |
| 213 Coeff* dst, | 213 Coeff* dst, |
| 214 GrTexture* background = NULL); | 214 GrTexture* background = NULL); |
| 215 | 215 |
| 216 SkDEVCODE(virtual void toString(SkString* str) const = 0;) | 216 SkDEVCODE(virtual void toString(SkString* str) const = 0;) |
| 217 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 217 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
| 218 SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) | 218 SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) |
| 219 | 219 |
| 220 protected: | 220 protected: |
| 221 SkXfermode(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {} | 221 SkXfermode(SkReadBuffer& rb) : SkFlattenable(rb) {} |
| 222 | 222 |
| 223 /** The default implementation of xfer32/xfer16/xferA8 in turn call this | 223 /** The default implementation of xfer32/xfer16/xferA8 in turn call this |
| 224 method, 1 color at a time (upscaled to a SkPMColor). The default | 224 method, 1 color at a time (upscaled to a SkPMColor). The default |
| 225 implmentation of this method just returns dst. If performance is | 225 implmentation of this method just returns dst. If performance is |
| 226 important, your subclass should override xfer32/xfer16/xferA8 directly. | 226 important, your subclass should override xfer32/xfer16/xferA8 directly. |
| 227 | 227 |
| 228 This method will not be called directly by the client, so it need not | 228 This method will not be called directly by the client, so it need not |
| 229 be implemented if your subclass has overridden xfer32/xfer16/xferA8 | 229 be implemented if your subclass has overridden xfer32/xfer16/xferA8 |
| 230 */ | 230 */ |
| 231 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; | 231 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 257 const SkAlpha aa[]) const SK_OVERRIDE; | 257 const SkAlpha aa[]) const SK_OVERRIDE; |
| 258 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, | 258 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, |
| 259 const SkAlpha aa[]) const SK_OVERRIDE; | 259 const SkAlpha aa[]) const SK_OVERRIDE; |
| 260 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, | 260 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, |
| 261 const SkAlpha aa[]) const SK_OVERRIDE; | 261 const SkAlpha aa[]) const SK_OVERRIDE; |
| 262 | 262 |
| 263 SK_DEVELOPER_TO_STRING() | 263 SK_DEVELOPER_TO_STRING() |
| 264 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode) | 264 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode) |
| 265 | 265 |
| 266 protected: | 266 protected: |
| 267 SkProcXfermode(SkFlattenableReadBuffer&); | 267 SkProcXfermode(SkReadBuffer&); |
| 268 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; | 268 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 269 | 269 |
| 270 // allow subclasses to update this after we unflatten | 270 // allow subclasses to update this after we unflatten |
| 271 void setProc(SkXfermodeProc proc) { | 271 void setProc(SkXfermodeProc proc) { |
| 272 fProc = proc; | 272 fProc = proc; |
| 273 } | 273 } |
| 274 | 274 |
| 275 SkXfermodeProc getProc() const { | 275 SkXfermodeProc getProc() const { |
| 276 return fProc; | 276 return fProc; |
| 277 } | 277 } |
| 278 | 278 |
| 279 private: | 279 private: |
| 280 SkXfermodeProc fProc; | 280 SkXfermodeProc fProc; |
| 281 | 281 |
| 282 typedef SkXfermode INHERITED; | 282 typedef SkXfermode INHERITED; |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 #endif | 285 #endif |
| OLD | NEW |