Index: src/effects/SkAlphaThresholdFilterImpl.h |
diff --git a/include/effects/SkMagnifierImageFilter.h b/src/effects/SkAlphaThresholdFilterImpl.h |
similarity index 51% |
copy from include/effects/SkMagnifierImageFilter.h |
copy to src/effects/SkAlphaThresholdFilterImpl.h |
index af142e9eff8436a87c212546e46b3adc444dc9b7..2d3b288c229d7fbb49401bca7597516a9278b513 100644 |
--- a/include/effects/SkMagnifierImageFilter.h |
+++ b/src/effects/SkAlphaThresholdFilterImpl.h |
@@ -1,26 +1,24 @@ |
/* |
- * Copyright 2012 The Android Open Source Project |
+ * Copyright 2015 Google Inc. |
* |
* Use of this source code is governed by a BSD-style license that can be |
* found in the LICENSE file. |
*/ |
+#ifndef SkAlphaThresholdFilterImpl_DEFINED |
+#define SkAlphaThresholdFilterImpl_DEFINED |
- |
-#ifndef SkMagnifierImageFilter_DEFINED |
-#define SkMagnifierImageFilter_DEFINED |
- |
-#include "SkRect.h" |
#include "SkImageFilter.h" |
+#include "SkRegion.h" |
-class SK_API SkMagnifierImageFilter : public SkImageFilter { |
+class SK_API SkAlphaThresholdFilterImpl : public SkImageFilter { |
public: |
- static SkImageFilter* Create(const SkRect& src, SkScalar inset, SkImageFilter* input = NULL); |
+ SkAlphaThresholdFilterImpl(const SkRegion& region, SkScalar innerThreshold, |
+ SkScalar outerThreshold, SkImageFilter* input); |
SK_TO_STRING_OVERRIDE() |
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) |
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAlphaThresholdFilterImpl) |
protected: |
- SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input); |
void flatten(SkWriteBuffer&) const override; |
bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
@@ -31,9 +29,10 @@ protected: |
#endif |
private: |
- SkRect fSrcRect; |
- SkScalar fInset; |
+ SkRegion fRegion; |
+ SkScalar fInnerThreshold; |
+ SkScalar fOuterThreshold; |
typedef SkImageFilter INHERITED; |
}; |
-#endif |
+#endif // SkAlphaThresholdFilterImpl_DEFINED |