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

Unified Diff: include/effects/SkMorphologyImageFilter.h

Issue 1390523005: factories should return baseclass, allowing the impl to specialize (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkMergeImageFilter.h ('k') | include/effects/SkOffsetImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkMorphologyImageFilter.h
diff --git a/include/effects/SkMorphologyImageFilter.h b/include/effects/SkMorphologyImageFilter.h
index 8d17609e5fda3d96c42b5bf11ac046ec0e4e7b98..c927f22e724f937623772382a791a69c1da21824 100644
--- a/include/effects/SkMorphologyImageFilter.h
+++ b/include/effects/SkMorphologyImageFilter.h
@@ -13,7 +13,7 @@
#include "SkImageFilter.h"
#include "SkSize.h"
-class SK_API SkMorphologyImageFilter : public SkImageFilter {
+class SkMorphologyImageFilter : public SkImageFilter {
public:
void computeFastBounds(const SkRect& src, SkRect* dst) const override;
bool onFilterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst) const override;
@@ -51,9 +51,8 @@ private:
class SK_API SkDilateImageFilter : public SkMorphologyImageFilter {
public:
- static SkDilateImageFilter* Create(int radiusX, int radiusY,
- SkImageFilter* input = NULL,
- const CropRect* cropRect = NULL) {
+ static SkImageFilter* Create(int radiusX, int radiusY, SkImageFilter* input = NULL,
+ const CropRect* cropRect = NULL) {
if (radiusX < 0 || radiusY < 0) {
return NULL;
}
@@ -62,6 +61,7 @@ public:
bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
+
#if SK_SUPPORT_GPU
bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
@@ -70,16 +70,16 @@ public:
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter)
-protected:
+private:
SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect)
: INHERITED(radiusX, radiusY, input, cropRect) {}
-private:
+
typedef SkMorphologyImageFilter INHERITED;
};
class SK_API SkErodeImageFilter : public SkMorphologyImageFilter {
public:
- static SkErodeImageFilter* Create(int radiusX, int radiusY,
+ static SkImageFilter* Create(int radiusX, int radiusY,
SkImageFilter* input = NULL,
const CropRect* cropRect = NULL) {
if (radiusX < 0 || radiusY < 0) {
@@ -90,6 +90,7 @@ public:
bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
+
#if SK_SUPPORT_GPU
bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const override;
@@ -98,11 +99,10 @@ public:
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter)
-protected:
+private:
SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect)
: INHERITED(radiusX, radiusY, input, cropRect) {}
-private:
typedef SkMorphologyImageFilter INHERITED;
};
« no previous file with comments | « include/effects/SkMergeImageFilter.h ('k') | include/effects/SkOffsetImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698