Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: src/core/SkXfermode_proccoeff.h

Issue 864833002: Remove the need for asCoeff in SkXfermode. (Closed) Base URL: https://skia.googlesource.com/skia.git@moreXferCleanup
Patch Set: Fix build Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698