diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-18 19:18:39 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-18 19:18:39 +0000 |
commit | 30711b764be6bbb58caa30a0ac5d1474c894efe7 (patch) | |
tree | 4014cf3c3bb63cab21359dbc126999d26db43f1e /samplecode | |
parent | ee8a8e3931c1d3f39755ee8beaf0c7cb1ba91888 (diff) |
change SkMaskFilter methods to const, in preparation for making the class as
immutable and re-entrant safe.
Review URL: https://codereview.appspot.com/6944069
git-svn-id: http://skia.googlecode.com/svn/trunk@6881 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleText.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/samplecode/SampleText.cpp b/samplecode/SampleText.cpp index 8ff36e469e..648321870a 100644 --- a/samplecode/SampleText.cpp +++ b/samplecode/SampleText.cpp @@ -31,8 +31,7 @@ class ReduceNoise : public SkKernel33ProcMaskFilter { public: ReduceNoise(int percent256) : SkKernel33ProcMaskFilter(percent256) {} - virtual uint8_t computeValue(uint8_t* const* srcRows) - { + virtual uint8_t computeValue(uint8_t* const* srcRows) const { int c = srcRows[1][1]; int min = 255, max = 0; for (int i = 0; i < 3; i++) @@ -58,8 +57,7 @@ private: class Darken : public SkKernel33ProcMaskFilter { public: Darken(int percent256) : SkKernel33ProcMaskFilter(percent256) {} - virtual uint8_t computeValue(uint8_t* const* srcRows) - { + virtual uint8_t computeValue(uint8_t* const* srcRows) const { int c = srcRows[1][1]; float f = c / 255.f; |