OLD | NEW |
1 #ifndef SkXfermode_proccoeff_DEFINED | 1 #ifndef SkXfermode_proccoeff_DEFINED |
2 #define SkXfermode_proccoeff_DEFINED | 2 #define SkXfermode_proccoeff_DEFINED |
3 | 3 |
4 #include "SkXfermode.h" | 4 #include "SkXfermode.h" |
5 #include "SkReadBuffer.h" | 5 #include "SkReadBuffer.h" |
6 #include "SkWriteBuffer.h" | 6 #include "SkWriteBuffer.h" |
7 | 7 |
8 struct ProcCoeff { | 8 struct ProcCoeff { |
9 SkXfermodeProc fProc; | 9 SkXfermodeProc fProc; |
10 SkXfermode::Coeff fSC; | 10 SkXfermode::Coeff fSC; |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 virtual bool asMode(Mode* mode) const SK_OVERRIDE; | 22 virtual bool asMode(Mode* mode) const SK_OVERRIDE; |
23 | 23 |
24 virtual bool asCoeff(Coeff* sc, Coeff* dc) const SK_OVERRIDE; | 24 virtual bool asCoeff(Coeff* sc, Coeff* dc) const SK_OVERRIDE; |
25 | 25 |
26 #if SK_SUPPORT_GPU | 26 #if SK_SUPPORT_GPU |
27 virtual bool asNewEffect(GrEffectRef** effect, | 27 virtual bool asNewEffect(GrEffectRef** effect, |
28 GrTexture* background) const SK_OVERRIDE; | 28 GrTexture* background) const SK_OVERRIDE; |
29 #endif | 29 #endif |
30 | 30 |
31 SK_DEVELOPER_TO_STRING() | 31 SK_TO_STRING_OVERRIDE() |
32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode) | 32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode) |
33 | 33 |
34 protected: | 34 protected: |
35 SkProcCoeffXfermode(const ProcCoeff& rec, Mode mode) | 35 SkProcCoeffXfermode(const ProcCoeff& rec, Mode mode) |
36 : INHERITED(rec.fProc) { | 36 : INHERITED(rec.fProc) { |
37 fMode = mode; | 37 fMode = mode; |
38 // these may be valid, or may be CANNOT_USE_COEFF | 38 // these may be valid, or may be CANNOT_USE_COEFF |
39 fSrcCoeff = rec.fSC; | 39 fSrcCoeff = rec.fSC; |
40 fDstCoeff = rec.fDC; | 40 fDstCoeff = rec.fDC; |
41 } | 41 } |
42 | 42 |
43 SkProcCoeffXfermode(SkReadBuffer& buffer); | 43 SkProcCoeffXfermode(SkReadBuffer& buffer); |
44 | 44 |
45 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; | 45 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; |
46 | 46 |
47 Mode getMode() const { | 47 Mode getMode() const { |
48 return fMode; | 48 return fMode; |
49 } | 49 } |
50 | 50 |
51 private: | 51 private: |
52 Mode fMode; | 52 Mode fMode; |
53 Coeff fSrcCoeff, fDstCoeff; | 53 Coeff fSrcCoeff, fDstCoeff; |
54 | 54 |
55 typedef SkProcXfermode INHERITED; | 55 typedef SkProcXfermode INHERITED; |
56 }; | 56 }; |
57 | 57 |
58 #endif // #ifndef SkXfermode_proccoeff_DEFINED | 58 #endif // #ifndef SkXfermode_proccoeff_DEFINED |
OLD | NEW |