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

Unified Diff: src/effects/SkAlphaThresholdFilterImpl.h

Issue 1500373003: SkAlphaThresholdFilter allow flattening (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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
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
« src/effects/SkAlphaThresholdFilter.cpp ('K') | « src/effects/SkAlphaThresholdFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698