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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, | 26 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, |
27 const SkAlpha aa[]) const SK_OVERRIDE; | 27 const SkAlpha aa[]) const SK_OVERRIDE; |
28 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, | 28 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, |
29 const SkAlpha aa[]) const SK_OVERRIDE; | 29 const SkAlpha aa[]) const SK_OVERRIDE; |
30 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, | 30 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, |
31 const SkAlpha aa[]) const SK_OVERRIDE; | 31 const SkAlpha aa[]) const SK_OVERRIDE; |
32 | 32 |
33 bool asMode(Mode* mode) const SK_OVERRIDE; | 33 bool asMode(Mode* mode) const SK_OVERRIDE; |
34 | 34 |
35 bool asCoeff(Coeff* sc, Coeff* dc) const SK_OVERRIDE; | 35 bool supportsCoverageAsAlpha() const SK_OVERRIDE; |
| 36 |
| 37 bool isOpaque(SkXfermode::SrcColorOpacity opacityType) const SK_OVERRIDE; |
36 | 38 |
37 #if SK_SUPPORT_GPU | 39 #if SK_SUPPORT_GPU |
38 virtual bool asFragmentProcessor(GrFragmentProcessor**, | 40 virtual bool asFragmentProcessor(GrFragmentProcessor**, |
39 GrTexture* background) const SK_OVERRIDE; | 41 GrTexture* background) const SK_OVERRIDE; |
40 | 42 |
41 virtual bool asXPFactory(GrXPFactory**) const SK_OVERRIDE; | 43 virtual bool asXPFactory(GrXPFactory**) const SK_OVERRIDE; |
42 #endif | 44 #endif |
43 | 45 |
44 SK_TO_STRING_OVERRIDE() | 46 SK_TO_STRING_OVERRIDE() |
45 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode) | 47 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode) |
46 | 48 |
47 protected: | 49 protected: |
48 void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; | 50 void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; |
49 | 51 |
50 Mode getMode() const { return fMode; } | 52 Mode getMode() const { return fMode; } |
51 | 53 |
52 SkXfermodeProc getProc() const { return fProc; } | 54 SkXfermodeProc getProc() const { return fProc; } |
53 | 55 |
54 private: | 56 private: |
55 SkXfermodeProc fProc; | 57 SkXfermodeProc fProc; |
56 Mode fMode; | 58 Mode fMode; |
57 Coeff fSrcCoeff, fDstCoeff; | 59 Coeff fSrcCoeff, fDstCoeff; |
58 | 60 |
59 friend class SkXfermode; | 61 friend class SkXfermode; |
60 | 62 |
61 typedef SkXfermode INHERITED; | 63 typedef SkXfermode INHERITED; |
62 }; | 64 }; |
63 | 65 |
64 #endif // #ifndef SkXfermode_proccoeff_DEFINED | 66 #endif // #ifndef SkXfermode_proccoeff_DEFINED |
OLD | NEW |