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

Unified Diff: include/effects/SkMagnifierImageFilter.h

Issue 1864843002: Update MagnifierImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
Index: include/effects/SkMagnifierImageFilter.h
diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h
index bea03adab36a7594f3abebf71db0600eb8d929f2..739f1eec733167df3df5806de464918218c01a8f 100644
--- a/include/effects/SkMagnifierImageFilter.h
+++ b/include/effects/SkMagnifierImageFilter.h
@@ -14,13 +14,20 @@
class SK_API SkMagnifierImageFilter : public SkImageFilter {
public:
- static SkImageFilter* Create(const SkRect& src, SkScalar inset, SkImageFilter* input = NULL);
+ static sk_sp<SkImageFilter> Make(const SkRect& src, SkScalar inset, sk_sp<SkImageFilter> input);
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)
+#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
+ static SkImageFilter* Create(const SkRect& src, SkScalar inset,
+ SkImageFilter* input = nullptr) {
+ return Make(src, inset, sk_ref_sp<SkImageFilter>(input)).release();
+ }
+#endif
+
protected:
- SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input);
+ SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, sk_sp<SkImageFilter> input);
void flatten(SkWriteBuffer&) const override;
bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&,

Powered by Google App Engine
This is Rietveld 408576698