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/effects/SkDisplacementMapEffect.h b/include/effects/SkDisplacementMapEffect.h
index de07fe4..5de4814 100644
--- a/include/effects/SkDisplacementMapEffect.h
+++ b/include/effects/SkDisplacementMapEffect.h
@@ -36,7 +36,7 @@
const SkBitmap& src,
const SkMatrix& ctm,
SkBitmap* dst,
- SkIPoint* offset) SK_OVERRIDE;
+ SkIPoint* offset) const SK_OVERRIDE;
virtual void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVERRIDE;
virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&,
@@ -45,7 +45,7 @@
#if SK_SUPPORT_GPU
virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; }
virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm,
- SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
+ SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
#endif
protected:
@@ -57,8 +57,6 @@
ChannelSelectorType fYChannelSelector;
SkScalar fScale;
typedef SkImageFilter INHERITED;
- SkImageFilter* getDisplacementInput() { return getInput(0); }
- SkImageFilter* getColorInput() { return getInput(1); }
const SkImageFilter* getDisplacementInput() const { return getInput(0); }
const SkImageFilter* getColorInput() const { return getInput(1); }
};