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

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

Issue 376953003: Clean up SkImageFilter constructors. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed 100-col issues Created 6 years, 5 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/SkMergeImageFilter.h ('k') | include/effects/SkTestImageFilters.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 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 8
9 #ifndef SkMorphologyImageFilter_DEFINED 9 #ifndef SkMorphologyImageFilter_DEFINED
10 #define SkMorphologyImageFilter_DEFINED 10 #define SkMorphologyImageFilter_DEFINED
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
62 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE; 62 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE;
63 #if SK_SUPPORT_GPU 63 #if SK_SUPPORT_GPU
64 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context &, 64 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context &,
65 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE; 65 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE;
66 #endif 66 #endif
67 67
68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) 68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter)
69 69
70 protected: 70 protected:
71 SkDilateImageFilter(int radiusX, int radiusY, 71 SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cr opRect* cropRect)
72 SkImageFilter* input = NULL,
73 const CropRect* cropRect = NULL)
74 : INHERITED(radiusX, radiusY, input, cropRect) {} 72 : INHERITED(radiusX, radiusY, input, cropRect) {}
75 explicit SkDilateImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} 73 explicit SkDilateImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {}
76 74
77 private: 75 private:
78 typedef SkMorphologyImageFilter INHERITED; 76 typedef SkMorphologyImageFilter INHERITED;
79 }; 77 };
80 78
81 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { 79 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter {
82 public: 80 public:
83 static SkErodeImageFilter* Create(int radiusX, int radiusY, 81 static SkErodeImageFilter* Create(int radiusX, int radiusY,
84 SkImageFilter* input = NULL, 82 SkImageFilter* input = NULL,
85 const CropRect* cropRect = NULL) { 83 const CropRect* cropRect = NULL) {
86 return SkNEW_ARGS(SkErodeImageFilter, (radiusX, radiusY, input, cropRect )); 84 return SkNEW_ARGS(SkErodeImageFilter, (radiusX, radiusY, input, cropRect ));
87 } 85 }
88 86
89 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 87 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
90 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE; 88 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE;
91 #if SK_SUPPORT_GPU 89 #if SK_SUPPORT_GPU
92 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context &, 90 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context &,
93 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE; 91 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE;
94 #endif 92 #endif
95 93
96 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) 94 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter)
97 95
98 protected: 96 protected:
99 SkErodeImageFilter(int radiusX, int radiusY, 97 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro pRect* cropRect)
100 SkImageFilter* input = NULL,
101 const CropRect* cropRect = NULL)
102 : INHERITED(radiusX, radiusY, input, cropRect) {} 98 : INHERITED(radiusX, radiusY, input, cropRect) {}
103 explicit SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} 99 explicit SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {}
104 100
105 private: 101 private:
106 typedef SkMorphologyImageFilter INHERITED; 102 typedef SkMorphologyImageFilter INHERITED;
107 }; 103 };
108 104
109 #endif 105 #endif
OLDNEW
« no previous file with comments | « include/effects/SkMergeImageFilter.h ('k') | include/effects/SkTestImageFilters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698