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

Unified Diff: gm/xfermodeimagefilter.cpp

Issue 1842243002: Update SkImageSource to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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/tileimagefilter.cpp ('k') | include/effects/SkImageSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodeimagefilter.cpp
diff --git a/gm/xfermodeimagefilter.cpp b/gm/xfermodeimagefilter.cpp
index dc8cbede2167b5462b5c0d60029ee74065540545..3293c81ba4ba49c12edea15e754436426215fed4 100644
--- a/gm/xfermodeimagefilter.cpp
+++ b/gm/xfermodeimagefilter.cpp
@@ -85,7 +85,7 @@ protected:
};
int x = 0, y = 0;
- sk_sp<SkImageFilter> background(SkImageSource::Create(fCheckerboard.get()));
+ sk_sp<SkImageFilter> background(SkImageSource::Make(fCheckerboard));
for (size_t i = 0; i < SK_ARRAY_COUNT(gModes); i++) {
paint.setImageFilter(SkXfermodeImageFilter::Make(SkXfermode::Make(gModes[i].fMode),
background.get()));
@@ -98,8 +98,7 @@ protected:
}
// Test arithmetic mode as image filter
paint.setImageFilter(SkXfermodeImageFilter::Make(
- SkArithmeticMode::Make(0, SK_Scalar1, SK_Scalar1, 0),
- background.get()));
+ SkArithmeticMode::Make(0, SK_Scalar1, SK_Scalar1, 0), background.get()));
DrawClippedBitmap(canvas, fBitmap, paint, x, y);
x += fBitmap.width() + MARGIN;
if (x + fBitmap.width() > WIDTH) {
@@ -118,7 +117,7 @@ protected:
SkIntToScalar(fBitmap.height() + 4));
// Test offsets on SrcMode (uses fixed-function blend)
sk_sp<SkImage> bitmapImage(SkImage::MakeFromBitmap(fBitmap));
- sk_sp<SkImageFilter> foreground(SkImageSource::Create(bitmapImage.get()));
+ sk_sp<SkImageFilter> foreground(SkImageSource::Make(std::move(bitmapImage)));
sk_sp<SkImageFilter> offsetForeground(SkOffsetImageFilter::Make(SkIntToScalar(4),
SkIntToScalar(-4),
foreground));
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | include/effects/SkImageSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698