Index: include/effects/SkMorphologyImageFilter.h |
diff --git a/include/effects/SkMorphologyImageFilter.h b/include/effects/SkMorphologyImageFilter.h |
index 880fc2ec2c4334fb42d3ecfd8c97627b24d1dbdb..3a55199939011da151fa96b7834b71bbba9d0d35 100644 |
--- a/include/effects/SkMorphologyImageFilter.h |
+++ b/include/effects/SkMorphologyImageFilter.h |
@@ -9,6 +9,7 @@ |
#ifndef SkMorphologyImageFilter_DEFINED |
#define SkMorphologyImageFilter_DEFINED |
+#include "SkColor.h" |
#include "SkImageFilter.h" |
#include "SkSize.h" |
@@ -16,11 +17,27 @@ class SK_API SkMorphologyImageFilter : public SkImageFilter { |
public: |
SkMorphologyImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect); |
+ /** |
+ * All morphology procs have the same signature: src is the source buffer, dst the |
+ * destination buffer, radius is the morphology radius, width and height are the bounds |
+ * of the destination buffer (in pixels), and srcStride and dstStride are the |
+ * number of pixels per row in each buffer. All buffers are 8888. |
+ */ |
+ |
+ typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, |
+ int width, int height, int srcStride, int dstStride); |
+ |
protected: |
+ bool filterImageGeneric(Proc procX, Proc procY, |
+ Proxy*, const SkBitmap& src, const SkMatrix&, |
+ SkBitmap* result, SkIPoint* offset); |
SkMorphologyImageFilter(SkFlattenableReadBuffer& buffer); |
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; |
#if SK_SUPPORT_GPU |
virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } |
+ bool filterImageGPUGeneric(bool dilate, Proxy* proxy, const SkBitmap& src, |
+ const SkMatrix& ctm, SkBitmap* result, |
+ SkIPoint* offset); |
#endif |
SkISize radius() const { return fRadius; } |