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

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

Issue 189913021: Implement support for a Context parameter in image filters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Revert all but the Context changes. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « include/effects/SkResizeImageFilter.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) { 10 static SkDownSampleImageFilter* Create(SkScalar scale) {
11 return SkNEW_ARGS(SkDownSampleImageFilter, (scale)); 11 return SkNEW_ARGS(SkDownSampleImageFilter, (scale));
12 } 12 }
13 13
14 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter) 14 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter)
15 15
16 protected: 16 protected:
17 SkDownSampleImageFilter(SkScalar scale) : INHERITED(0), fScale(scale) {} 17 SkDownSampleImageFilter(SkScalar scale) : INHERITED(0), fScale(scale) {}
18 SkDownSampleImageFilter(SkReadBuffer& buffer); 18 SkDownSampleImageFilter(SkReadBuffer& buffer);
19 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 19 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
20 20
21 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 21 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
22 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E; 22 SkBitmap* result, SkIPoint* loc) const SK_OVERRID E;
23 23
24 private: 24 private:
25 SkScalar fScale; 25 SkScalar fScale;
26 26
27 typedef SkImageFilter INHERITED; 27 typedef SkImageFilter INHERITED;
28 }; 28 };
29 29
30 #endif 30 #endif
OLDNEW
« no previous file with comments | « include/effects/SkResizeImageFilter.h ('k') | include/effects/SkTileImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698