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

Unified Diff: include/effects/SkAlphaThresholdFilter.h

Issue 1847053004: Update SkAlphaThresholdFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix sample app Created 4 years, 9 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 | « gm/imagealphathreshold.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkAlphaThresholdFilter.h
diff --git a/include/effects/SkAlphaThresholdFilter.h b/include/effects/SkAlphaThresholdFilter.h
index 033e8d1e54090b63a700d6d5eec936a7799b0590..aee365f99986b8f996f699bc3433e4c5895a03f9 100644
--- a/include/effects/SkAlphaThresholdFilter.h
+++ b/include/effects/SkAlphaThresholdFilter.h
@@ -8,8 +8,8 @@
#ifndef SkAlphaThresholdFilter_DEFINED
#define SkAlphaThresholdFilter_DEFINED
-#include "SkRegion.h"
#include "SkImageFilter.h"
+#include "SkRegion.h"
class SK_API SkAlphaThresholdFilter {
public:
@@ -20,8 +20,17 @@ public:
* The 0,0 point of the region corresponds to the upper left corner of the
* source image.
*/
+ static sk_sp<SkImageFilter> Make(const SkRegion& region, SkScalar innerMin,
+ SkScalar outerMax, sk_sp<SkImageFilter> input);
+
+
+#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
static SkImageFilter* Create(const SkRegion& region, SkScalar innerMin,
- SkScalar outerMax, SkImageFilter* input = NULL);
+ SkScalar outerMax, SkImageFilter* input = nullptr) {
+ return Make(region, innerMin, outerMax, sk_ref_sp<SkImageFilter>(input)).release();
+ }
+#endif
+
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
};
« no previous file with comments | « gm/imagealphathreshold.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698