OLD | NEW |
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 class SK_API SkDilateImageFilter : public SkMorphologyImageFilter { | 53 class SK_API SkDilateImageFilter : public SkMorphologyImageFilter { |
54 public: | 54 public: |
55 static SkImageFilter* Create(int radiusX, int radiusY, SkImageFilter* input
= NULL, | 55 static SkImageFilter* Create(int radiusX, int radiusY, SkImageFilter* input
= NULL, |
56 const CropRect* cropRect = NULL) { | 56 const CropRect* cropRect = NULL) { |
57 if (radiusX < 0 || radiusY < 0) { | 57 if (radiusX < 0 || radiusY < 0) { |
58 return NULL; | 58 return NULL; |
59 } | 59 } |
60 return new SkDilateImageFilter(radiusX, radiusY, input, cropRect); | 60 return new SkDilateImageFilter(radiusX, radiusY, input, cropRect); |
61 } | 61 } |
62 | 62 |
63 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 63 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, |
64 SkBitmap* result, SkIPoint* offset) const override; | 64 SkBitmap* result, SkIPoint* offset) const overr
ide; |
65 | 65 |
66 #if SK_SUPPORT_GPU | 66 #if SK_SUPPORT_GPU |
67 bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&, | 67 bool filterImageGPUDeprecated(Proxy* proxy, const SkBitmap& src, const Conte
xt&, |
68 SkBitmap* result, SkIPoint* offset) const override; | 68 SkBitmap* result, SkIPoint* offset) const over
ride; |
69 #endif | 69 #endif |
70 | 70 |
71 SK_TO_STRING_OVERRIDE() | 71 SK_TO_STRING_OVERRIDE() |
72 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) | 72 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) |
73 | 73 |
74 private: | 74 private: |
75 SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cr
opRect* cropRect) | 75 SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cr
opRect* cropRect) |
76 : INHERITED(radiusX, radiusY, input, cropRect) {} | 76 : INHERITED(radiusX, radiusY, input, cropRect) {} |
77 | 77 |
78 typedef SkMorphologyImageFilter INHERITED; | 78 typedef SkMorphologyImageFilter INHERITED; |
79 }; | 79 }; |
80 | 80 |
81 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { | 81 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { |
82 public: | 82 public: |
83 static SkImageFilter* Create(int radiusX, int radiusY, | 83 static SkImageFilter* Create(int radiusX, int radiusY, |
84 SkImageFilter* input = NULL, | 84 SkImageFilter* input = NULL, |
85 const CropRect* cropRect = NULL) { | 85 const CropRect* cropRect = NULL) { |
86 if (radiusX < 0 || radiusY < 0) { | 86 if (radiusX < 0 || radiusY < 0) { |
87 return NULL; | 87 return NULL; |
88 } | 88 } |
89 return new SkErodeImageFilter(radiusX, radiusY, input, cropRect); | 89 return new SkErodeImageFilter(radiusX, radiusY, input, cropRect); |
90 } | 90 } |
91 | 91 |
92 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 92 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, |
93 SkBitmap* result, SkIPoint* offset) const override; | 93 SkBitmap* result, SkIPoint* offset) const overr
ide; |
94 | 94 |
95 #if SK_SUPPORT_GPU | 95 #if SK_SUPPORT_GPU |
96 bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&, | 96 bool filterImageGPUDeprecated(Proxy* proxy, const SkBitmap& src, const Conte
xt&, |
97 SkBitmap* result, SkIPoint* offset) const override; | 97 SkBitmap* result, SkIPoint* offset) const over
ride; |
98 #endif | 98 #endif |
99 | 99 |
100 SK_TO_STRING_OVERRIDE() | 100 SK_TO_STRING_OVERRIDE() |
101 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 101 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) |
102 | 102 |
103 private: | 103 private: |
104 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
pRect* cropRect) | 104 SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
pRect* cropRect) |
105 : INHERITED(radiusX, radiusY, input, cropRect) {} | 105 : INHERITED(radiusX, radiusY, input, cropRect) {} |
106 | 106 |
107 typedef SkMorphologyImageFilter INHERITED; | 107 typedef SkMorphologyImageFilter INHERITED; |
108 }; | 108 }; |
109 | 109 |
110 #endif | 110 #endif |
OLD | NEW |