| 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 public: | 53 public: | 
| 54     static SkDilateImageFilter* Create(int radiusX, int radiusY, | 54     static SkDilateImageFilter* Create(int radiusX, int radiusY, | 
| 55                                        SkImageFilter* input = NULL, | 55                                        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 SkNEW_ARGS(SkDilateImageFilter, (radiusX, radiusY, input, cropRec
     t)); | 60         return SkNEW_ARGS(SkDilateImageFilter, (radiusX, radiusY, input, cropRec
     t)); | 
| 61     } | 61     } | 
| 62 | 62 | 
| 63     virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 63     bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 
| 64                                SkBitmap* result, SkIPoint* offset) const overrid
     e; | 64                        SkBitmap* result, SkIPoint* offset) const override; | 
| 65 #if SK_SUPPORT_GPU | 65 #if SK_SUPPORT_GPU | 
| 66     virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
     &, | 66     bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&, | 
| 67                                 SkBitmap* result, SkIPoint* offset) const overri
     de; | 67                         SkBitmap* result, SkIPoint* offset) const override; | 
| 68 #endif | 68 #endif | 
| 69 | 69 | 
| 70     SK_TO_STRING_OVERRIDE() | 70     SK_TO_STRING_OVERRIDE() | 
| 71     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) | 71     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) | 
| 72 | 72 | 
| 73 protected: | 73 protected: | 
| 74     SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cr
     opRect* cropRect) | 74     SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cr
     opRect* cropRect) | 
| 75         : INHERITED(radiusX, radiusY, input, cropRect) {} | 75         : INHERITED(radiusX, radiusY, input, cropRect) {} | 
| 76 private: | 76 private: | 
| 77     typedef SkMorphologyImageFilter INHERITED; | 77     typedef SkMorphologyImageFilter INHERITED; | 
| 78 }; | 78 }; | 
| 79 | 79 | 
| 80 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { | 80 class SK_API SkErodeImageFilter : public SkMorphologyImageFilter { | 
| 81 public: | 81 public: | 
| 82     static SkErodeImageFilter* Create(int radiusX, int radiusY, | 82     static SkErodeImageFilter* Create(int radiusX, int radiusY, | 
| 83                                       SkImageFilter* input = NULL, | 83                                       SkImageFilter* input = NULL, | 
| 84                                       const CropRect* cropRect = NULL) { | 84                                       const CropRect* cropRect = NULL) { | 
| 85         if (radiusX < 0 || radiusY < 0) { | 85         if (radiusX < 0 || radiusY < 0) { | 
| 86             return NULL; | 86             return NULL; | 
| 87         } | 87         } | 
| 88         return SkNEW_ARGS(SkErodeImageFilter, (radiusX, radiusY, input, cropRect
     )); | 88         return SkNEW_ARGS(SkErodeImageFilter, (radiusX, radiusY, input, cropRect
     )); | 
| 89     } | 89     } | 
| 90 | 90 | 
| 91     virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 91     bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 
| 92                                SkBitmap* result, SkIPoint* offset) const overrid
     e; | 92                        SkBitmap* result, SkIPoint* offset) const override; | 
| 93 #if SK_SUPPORT_GPU | 93 #if SK_SUPPORT_GPU | 
| 94     virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context
     &, | 94     bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&, | 
| 95                                 SkBitmap* result, SkIPoint* offset) const overri
     de; | 95                         SkBitmap* result, SkIPoint* offset) const override; | 
| 96 #endif | 96 #endif | 
| 97 | 97 | 
| 98     SK_TO_STRING_OVERRIDE() | 98     SK_TO_STRING_OVERRIDE() | 
| 99     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 99     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) | 
| 100 | 100 | 
| 101 protected: | 101 protected: | 
| 102     SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
     pRect* cropRect) | 102     SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const Cro
     pRect* cropRect) | 
| 103         : INHERITED(radiusX, radiusY, input, cropRect) {} | 103         : INHERITED(radiusX, radiusY, input, cropRect) {} | 
| 104 | 104 | 
| 105 private: | 105 private: | 
| 106     typedef SkMorphologyImageFilter INHERITED; | 106     typedef SkMorphologyImageFilter INHERITED; | 
| 107 }; | 107 }; | 
| 108 | 108 | 
| 109 #endif | 109 #endif | 
| OLD | NEW | 
|---|