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

Unified Diff: src/core/SkXfermode_proccoeff.h

Issue 240533003: Orphan ProcXfermode, with an eye towards removing it (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: guard toString Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode_proccoeff.h
diff --git a/src/core/SkXfermode_proccoeff.h b/src/core/SkXfermode_proccoeff.h
index 977c3dace753973e61b24ef233e4d18297e9912c..7edf6654a43d124abab7238934502e2d149469e9 100644
--- a/src/core/SkXfermode_proccoeff.h
+++ b/src/core/SkXfermode_proccoeff.h
@@ -13,12 +13,19 @@ struct ProcCoeff {
#define CANNOT_USE_COEFF SkXfermode::Coeff(-1)
-class SK_API SkProcCoeffXfermode : public SkProcXfermode {
+class SK_API SkProcCoeffXfermode : public SkXfermode {
public:
static SkProcCoeffXfermode* Create(const ProcCoeff& rec, Mode mode) {
return SkNEW_ARGS(SkProcCoeffXfermode, (rec, mode));
}
+ virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
+ const SkAlpha aa[]) const SK_OVERRIDE;
+ virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count,
+ const SkAlpha aa[]) const SK_OVERRIDE;
+ virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count,
+ const SkAlpha aa[]) const SK_OVERRIDE;
+
virtual bool asMode(Mode* mode) const SK_OVERRIDE;
virtual bool asCoeff(Coeff* sc, Coeff* dc) const SK_OVERRIDE;
@@ -32,9 +39,9 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode)
protected:
- SkProcCoeffXfermode(const ProcCoeff& rec, Mode mode)
- : INHERITED(rec.fProc) {
+ SkProcCoeffXfermode(const ProcCoeff& rec, Mode mode) {
fMode = mode;
+ fProc = rec.fProc;
// these may be valid, or may be CANNOT_USE_COEFF
fSrcCoeff = rec.fSC;
fDstCoeff = rec.fDC;
@@ -44,15 +51,16 @@ protected:
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
- Mode getMode() const {
- return fMode;
- }
+ Mode getMode() const { return fMode; }
+
+ SkXfermodeProc getProc() const { return fProc; }
private:
- Mode fMode;
- Coeff fSrcCoeff, fDstCoeff;
+ SkXfermodeProc fProc;
+ Mode fMode;
+ Coeff fSrcCoeff, fDstCoeff;
- typedef SkProcXfermode INHERITED;
+ typedef SkXfermode INHERITED;
};
#endif // #ifndef SkXfermode_proccoeff_DEFINED
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698