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

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

Issue 22438003: Move SkComposeImageFilter into its own {.h, .cpp} files (Closed) Base URL: http://skia.googlecode.com/svn/trunk
Patch Set: Fix nit Created 7 years, 4 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/SkComposeImageFilter.h ('k') | src/effects/SkComposeImageFilter.cpp » ('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 class SK_API SkComposeImageFilter : public SkImageFilter {
8 public:
9 SkComposeImageFilter(SkImageFilter* outer, SkImageFilter* inner) : INHERITED (outer, inner) {}
10 virtual ~SkComposeImageFilter();
11
12 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter)
13
14 protected:
15 SkComposeImageFilter(SkFlattenableReadBuffer& buffer);
16
17 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
18 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
19 virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OV ERRIDE;
20
21 private:
22 typedef SkImageFilter INHERITED;
23 };
24
25 ///////////////////////////////////////////////////////////////////////////////
26
27 // 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
28 class SK_API SkDownSampleImageFilter : public SkImageFilter { 8 class SK_API SkDownSampleImageFilter : public SkImageFilter {
29 public: 9 public:
30 SkDownSampleImageFilter(SkScalar scale) : INHERITED(0), fScale(scale) {} 10 SkDownSampleImageFilter(SkScalar scale) : INHERITED(0), fScale(scale) {}
31 11
32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter) 12 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter)
33 13
34 protected: 14 protected:
35 SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer); 15 SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer);
36 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 16 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
37 17
38 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 18 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
39 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE; 19 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
40 20
41 private: 21 private:
42 SkScalar fScale; 22 SkScalar fScale;
43 23
44 typedef SkImageFilter INHERITED; 24 typedef SkImageFilter INHERITED;
45 }; 25 };
46 26
47 #endif 27 #endif
OLDNEW
« no previous file with comments | « include/effects/SkComposeImageFilter.h ('k') | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698