Make SkImageFilter methods const.
SkImageFilter had some non-const methods that could all be made const.
This is a first step towards making SkImageFilter immutable.
BUG=skia:2097
R=mtklein@google.com, reed@google.com, robertphillips@google.com
Author: dominikg@chromium.org
Review URL: https://codereview.chromium.org/148883011
git-svn-id: http://skia.googlecode.com/svn/trunk@13330 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 6b53987..a3e5a62 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -55,10 +55,10 @@
virtual SkBaseDevice* createDevice(int width, int height) = 0;
// returns true if the proxy can handle this filter natively
- virtual bool canHandleImageFilter(SkImageFilter*) = 0;
+ virtual bool canHandleImageFilter(const SkImageFilter*) = 0;
// returns true if the proxy handled the filter itself. if this returns
// false then the filter's code will be called.
- virtual bool filterImage(SkImageFilter*, const SkBitmap& src,
+ virtual bool filterImage(const SkImageFilter*, const SkBitmap& src,
const SkMatrix& ctm,
SkBitmap* result, SkIPoint* offset) = 0;
};
@@ -77,7 +77,7 @@
* the result and offset parameters will be ignored by the caller.
*/
bool filterImage(Proxy*, const SkBitmap& src, const SkMatrix& ctm,
- SkBitmap* result, SkIPoint* offset);
+ SkBitmap* result, SkIPoint* offset) const;
/**
* Given the src bounds of an image, this returns the bounds of the result
@@ -105,7 +105,7 @@
* single-pass processing using asNewEffect().
*/
virtual bool filterImageGPU(Proxy*, const SkBitmap& src, const SkMatrix& ctm,
- SkBitmap* result, SkIPoint* offset);
+ SkBitmap* result, SkIPoint* offset) const;
/**
* Returns whether this image filter is a color filter and puts the color filter into the
@@ -187,7 +187,7 @@
* caller.
*/
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
- SkBitmap* result, SkIPoint* offset);
+ SkBitmap* result, SkIPoint* offset) const;
// Given the bounds of the destination rect to be filled in device
// coordinates (first parameter), and the CTM, compute (conservatively)
// which rect of the source image would be required (third parameter).