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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1852123002: Update SkXfermodeImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Overload Make methods 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
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkXfermodeImageFilter.cpp
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index 45c9f70568c714711fb1486e42dc490d33b50b6a..a29136a0dd603ec0eb50e5d63d8230bb8e365f58 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -23,24 +23,25 @@
///////////////////////////////////////////////////////////////////////////////
-sk_sp<SkImageFilter> SkXfermodeImageFilter::Make(sk_sp<SkXfermode> mode, SkImageFilter* background,
- SkImageFilter* foreground,
+sk_sp<SkImageFilter> SkXfermodeImageFilter::Make(sk_sp<SkXfermode> mode,
+ sk_sp<SkImageFilter> background,
+ sk_sp<SkImageFilter> foreground,
const CropRect* cropRect) {
- SkImageFilter* inputs[2] = { background, foreground };
+ sk_sp<SkImageFilter> inputs[2] = { std::move(background), std::move(foreground) };
return sk_sp<SkImageFilter>(new SkXfermodeImageFilter(mode, inputs, cropRect));
}
SkXfermodeImageFilter::SkXfermodeImageFilter(sk_sp<SkXfermode> mode,
- SkImageFilter* inputs[2],
+ sk_sp<SkImageFilter> inputs[2],
const CropRect* cropRect)
- : INHERITED(2, inputs, cropRect)
+ : INHERITED(inputs, 2, cropRect)
, fMode(std::move(mode))
{}
sk_sp<SkFlattenable> SkXfermodeImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2);
sk_sp<SkXfermode> mode(buffer.readXfermode());
- return Make(std::move(mode), common.getInput(0).get(), common.getInput(1).get(),
+ return Make(std::move(mode), common.getInput(0), common.getInput(1),
&common.cropRect());
}
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698