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

Side by Side Diff: include/effects/SkTestImageFilters.h

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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 | « include/effects/SkTableMaskFilter.h ('k') | include/effects/SkTileImageFilter.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 #ifndef _SkTestImageFilters_h 1 #ifndef _SkTestImageFilters_h
2 #define _SkTestImageFilters_h 2 #define _SkTestImageFilters_h
3 3
4 #include "SkImageFilter.h" 4 #include "SkImageFilter.h"
5 #include "SkPoint.h" 5 #include "SkPoint.h"
6 6
7 // Fun mode that scales down (only) and then scales back up to look pixelated 7 // Fun mode that scales down (only) and then scales back up to look pixelated
8 class SK_API SkDownSampleImageFilter : public SkImageFilter { 8 class SK_API SkDownSampleImageFilter : public SkImageFilter {
9 public: 9 public:
10 static SkDownSampleImageFilter* Create(SkScalar scale, SkImageFilter* input = NULL) { 10 static SkDownSampleImageFilter* Create(SkScalar scale, SkImageFilter* input = NULL) {
11 if (!SkScalarIsFinite(scale)) { 11 if (!SkScalarIsFinite(scale)) {
12 return NULL; 12 return NULL;
13 } 13 }
14 // we don't support scale in this range 14 // we don't support scale in this range
15 if (scale > SK_Scalar1 || scale <= 0) { 15 if (scale > SK_Scalar1 || scale <= 0) {
16 return NULL; 16 return NULL;
17 } 17 }
18 return SkNEW_ARGS(SkDownSampleImageFilter, (scale, input)); 18 return SkNEW_ARGS(SkDownSampleImageFilter, (scale, input));
19 } 19 }
20 20
21 SK_TO_STRING_OVERRIDE() 21 SK_TO_STRING_OVERRIDE()
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter) 22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter)
23 23
24 protected: 24 protected:
25 SkDownSampleImageFilter(SkScalar scale, SkImageFilter* input) 25 SkDownSampleImageFilter(SkScalar scale, SkImageFilter* input)
26 : INHERITED(1, &input), fScale(scale) {} 26 : INHERITED(1, &input), fScale(scale) {}
27 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 27 void flatten(SkWriteBuffer&) const SK_OVERRIDE;
28 28
29 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 29 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
30 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E; 30 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E;
31 31
32 private: 32 private:
33 SkScalar fScale; 33 SkScalar fScale;
34 34
35 typedef SkImageFilter INHERITED; 35 typedef SkImageFilter INHERITED;
36 }; 36 };
37 37
38 #endif 38 #endif
OLDNEW
« no previous file with comments | « include/effects/SkTableMaskFilter.h ('k') | include/effects/SkTileImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698