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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 * is NULL, and if so, treats it as kSrcOver_Mode. | 212 * is NULL, and if so, treats it as kSrcOver_Mode. |
213 */ | 213 */ |
214 static bool AsNewEffectOrCoeff(SkXfermode*, | 214 static bool AsNewEffectOrCoeff(SkXfermode*, |
215 GrContext*, | 215 GrContext*, |
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_GROUP_TYPE(SkXfermode) |
223 protected: | 223 protected: |
224 SkXfermode(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {} | 224 SkXfermode(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {} |
225 | 225 |
226 /** The default implementation of xfer32/xfer16/xferA8 in turn call this | 226 /** The default implementation of xfer32/xfer16/xferA8 in turn call this |
227 method, 1 color at a time (upscaled to a SkPMColor). The default | 227 method, 1 color at a time (upscaled to a SkPMColor). The default |
228 implmentation of this method just returns dst. If performance is | 228 implmentation of this method just returns dst. If performance is |
229 important, your subclass should override xfer32/xfer16/xferA8 directly. | 229 important, your subclass should override xfer32/xfer16/xferA8 directly. |
230 | 230 |
231 This method will not be called directly by the client, so it need not | 231 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 | 232 be implemented if your subclass has overridden xfer32/xfer16/xferA8 |
(...skipping 20 matching lines...) Expand all Loading... | |
253 | 253 |
254 // overrides from SkXfermode | 254 // overrides from SkXfermode |
255 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, | 255 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, |
256 const SkAlpha aa[]) const SK_OVERRIDE; | 256 const SkAlpha aa[]) const SK_OVERRIDE; |
257 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, | 257 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, |
258 const SkAlpha aa[]) const SK_OVERRIDE; | 258 const SkAlpha aa[]) const SK_OVERRIDE; |
259 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, | 259 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, |
260 const SkAlpha aa[]) const SK_OVERRIDE; | 260 const SkAlpha aa[]) const SK_OVERRIDE; |
261 | 261 |
262 SK_DEVELOPER_TO_STRING() | 262 SK_DEVELOPER_TO_STRING() |
263 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode) | 263 SK_DECLARE_FLATTENABLE_BASE_SERIALIZABLE_TYPE(SkProcXfermode) |
reed1
2013/10/03 08:41:09
What does base_serializable_type mean? My first gu
| |
264 | 264 |
265 protected: | 265 protected: |
266 SkProcXfermode(SkFlattenableReadBuffer&); | 266 SkProcXfermode(SkFlattenableReadBuffer&); |
267 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; | 267 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; |
268 | 268 |
269 // allow subclasses to update this after we unflatten | 269 // allow subclasses to update this after we unflatten |
270 void setProc(SkXfermodeProc proc) { | 270 void setProc(SkXfermodeProc proc) { |
271 fProc = proc; | 271 fProc = proc; |
272 } | 272 } |
273 | 273 |
274 private: | 274 private: |
275 SkXfermodeProc fProc; | 275 SkXfermodeProc fProc; |
276 | 276 |
277 typedef SkXfermode INHERITED; | 277 typedef SkXfermode INHERITED; |
278 }; | 278 }; |
279 | 279 |
280 #endif | 280 #endif |
OLD | NEW |