Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: gm/imagefiltersgraph.cpp

Issue 148883011: Make SkImageFilter methods const. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More fixes to gm/ Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | include/core/SkBitmapDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 9
10 #include "SkArithmeticMode.h" 10 #include "SkArithmeticMode.h"
(...skipping 11 matching lines...) Expand all
22 #include "SkXfermodeImageFilter.h" 22 #include "SkXfermodeImageFilter.h"
23 23
24 // More closely models how Blink's OffsetFilter works as of 10/23/13. SkOffsetIm ageFilter doesn't 24 // More closely models how Blink's OffsetFilter works as of 10/23/13. SkOffsetIm ageFilter doesn't
25 // perform a draw and this one does. 25 // perform a draw and this one does.
26 class SimpleOffsetFilter : public SkImageFilter { 26 class SimpleOffsetFilter : public SkImageFilter {
27 public: 27 public:
28 SimpleOffsetFilter(SkScalar dx, SkScalar dy, SkImageFilter* input) 28 SimpleOffsetFilter(SkScalar dx, SkScalar dy, SkImageFilter* input)
29 : SkImageFilter(input), fDX(dx), fDY(dy) {} 29 : SkImageFilter(input), fDX(dx), fDY(dy) {}
30 30
31 virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const SkMatrix & ctm, 31 virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const SkMatrix & ctm,
32 SkBitmap* dst, SkIPoint* offset) SK_OVERRIDE { 32 SkBitmap* dst, SkIPoint* offset) const SK_OVERRID E {
33 SkBitmap source = src; 33 SkBitmap source = src;
34 SkImageFilter* input = getInput(0); 34 SkImageFilter* input = getInput(0);
35 SkIPoint srcOffset = SkIPoint::Make(0, 0); 35 SkIPoint srcOffset = SkIPoint::Make(0, 0);
36 if (NULL != input && !input->filterImage(proxy, src, ctm, &source, &srcO ffset)) { 36 if (NULL != input && !input->filterImage(proxy, src, ctm, &source, &srcO ffset)) {
37 return false; 37 return false;
38 } 38 }
39 39
40 SkIRect bounds; 40 SkIRect bounds;
41 source.getBounds(&bounds); 41 source.getBounds(&bounds);
42 42
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 private: 206 private:
207 typedef GM INHERITED; 207 typedef GM INHERITED;
208 SkBitmap fBitmap; 208 SkBitmap fBitmap;
209 bool fInitialized; 209 bool fInitialized;
210 }; 210 };
211 211
212 /////////////////////////////////////////////////////////////////////////////// 212 ///////////////////////////////////////////////////////////////////////////////
213 213
214 static skiagm::GM* MyFactory(void*) { return new ImageFiltersGraphGM; } 214 static skiagm::GM* MyFactory(void*) { return new ImageFiltersGraphGM; }
215 static skiagm::GMRegistry reg(MyFactory); 215 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | include/core/SkBitmapDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698