diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-17 19:55:24 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-17 19:55:24 +0000 |
commit | 30da745bbf67a0ee0f305ca7bbdb685cc8a9e686 (patch) | |
tree | 9b040462c5d1a2f00b09a1db762b7c8a2dac93c5 /include/core | |
parent | 82ec0b00f380906c1cdeb4b4cc4a355264ab3882 (diff) |
Mark all methods on SkXfermode as const, in preparation for declaring all
xfermodes as immutable/reentrant-safe
Review URL: https://codereview.appspot.com/6941065
git-svn-id: http://skia.googlecode.com/svn/trunk@6855 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkXfermode.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h index 99d5a9cc12..7fc1d501a5 100644 --- a/include/core/SkXfermode.h +++ b/include/core/SkXfermode.h @@ -28,13 +28,13 @@ public: SkXfermode() {} virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]); + const SkAlpha aa[]) const; virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]); + const SkAlpha aa[]) const; virtual void xfer4444(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]); + const SkAlpha aa[]) const; virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, - const SkAlpha aa[]); + const SkAlpha aa[]) const; /** Enum of possible coefficients to describe some xfermodes */ @@ -68,13 +68,13 @@ public: srcover one isa dstover ida one */ - virtual bool asCoeff(Coeff* src, Coeff* dst); + virtual bool asCoeff(Coeff* src, Coeff* dst) const; /** * The same as calling xfermode->asCoeff(..), except that this also checks * if the xfermode is NULL, and if so, treats its as kSrcOver_Mode. */ - static bool AsCoeff(SkXfermode*, Coeff* src, Coeff* dst); + static bool AsCoeff(const SkXfermode*, Coeff* src, Coeff* dst); /** List of predefined xfermodes. The algebra for the modes uses the following symbols: @@ -125,13 +125,13 @@ public: * returns true and sets (if not null) mode accordingly. Otherwise it * returns false and ignores the mode parameter. */ - virtual bool asMode(Mode* mode); + virtual bool asMode(Mode* mode) const; /** * The same as calling xfermode->asMode(mode), except that this also checks * if the xfermode is NULL, and if so, treats its as kSrcOver_Mode. */ - static bool AsMode(SkXfermode*, Mode* mode); + static bool AsMode(const SkXfermode*, Mode* mode); /** * Returns true if the xfermode claims to be the specified Mode. This works @@ -143,7 +143,7 @@ public: * ... * } */ - static bool IsMode(SkXfermode* xfer, Mode mode); + static bool IsMode(const SkXfermode* xfer, Mode mode); /** Return an SkXfermode object for the specified mode. */ @@ -170,7 +170,7 @@ public: static bool ModeAsCoeff(Mode mode, Coeff* src, Coeff* dst); // DEPRECATED: call AsMode(...) - static bool IsMode(SkXfermode* xfer, Mode* mode) { + static bool IsMode(const SkXfermode* xfer, Mode* mode) { return AsMode(xfer, mode); } @@ -186,7 +186,7 @@ protected: This method will not be called directly by the client, so it need not be implemented if your subclass has overridden xfer32/xfer16/xferA8 */ - virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst); + virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; private: enum { @@ -208,13 +208,13 @@ public: // overrides from SkXfermode virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) SK_OVERRIDE; + const SkAlpha aa[]) const SK_OVERRIDE; virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) SK_OVERRIDE; + const SkAlpha aa[]) const SK_OVERRIDE; virtual void xfer4444(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) SK_OVERRIDE; + const SkAlpha aa[]) const SK_OVERRIDE; virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) SK_OVERRIDE; + const SkAlpha aa[]) const SK_OVERRIDE; SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode) |