diff options
author | 2014-02-05 22:32:02 +0000 | |
---|---|---|
committer | 2014-02-05 22:32:02 +0000 | |
commit | ae761f7545d8ebf181d220169afac2056b057b8c (patch) | |
tree | 73cf6f3c8e384ad332956319046e6536bed97ba4 /gm | |
parent | d2e88f67c9678fbda24ff74039fc1f3aae603e74 (diff) |
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
Diffstat (limited to 'gm')
-rw-r--r-- | gm/imagefiltersbase.cpp | 4 | ||||
-rw-r--r-- | gm/imagefiltersgraph.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp index 109be6a1e0..4794b02699 100644 --- a/gm/imagefiltersbase.cpp +++ b/gm/imagefiltersbase.cpp @@ -23,7 +23,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(FailImageFilter) protected: virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, - SkBitmap* result, SkIPoint* offset) { + SkBitmap* result, SkIPoint* offset) const { return false; } @@ -46,7 +46,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(IdentityImageFilter) protected: virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, - SkBitmap* result, SkIPoint* offset) { + SkBitmap* result, SkIPoint* offset) const { *result = src; return true; } diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp index 40b673cb42..6d5105e304 100644 --- a/gm/imagefiltersgraph.cpp +++ b/gm/imagefiltersgraph.cpp @@ -29,7 +29,7 @@ public: : SkImageFilter(input), fDX(dx), fDY(dy) {} virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm, - SkBitmap* dst, SkIPoint* offset) SK_OVERRIDE { + SkBitmap* dst, SkIPoint* offset) const SK_OVERRIDE { SkBitmap source = src; SkImageFilter* input = getInput(0); SkIPoint srcOffset = SkIPoint::Make(0, 0); |