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

Unified Diff: gm/offsetimagefilter.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/imagesource2.cpp ('k') | gm/resizeimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/offsetimagefilter.cpp
diff --git a/gm/offsetimagefilter.cpp b/gm/offsetimagefilter.cpp
index 51a93f86f16ccbe3f8172c716dc7c7f75b25a167..8f23483212abe86a0fb18d7d86ddac700c4b0b70 100644
--- a/gm/offsetimagefilter.cpp
+++ b/gm/offsetimagefilter.cpp
@@ -47,17 +47,17 @@ protected:
SkPaint paint;
for (int i = 0; i < 4; i++) {
- SkImage* image = (i & 0x01) ? fCheckerboard.get() : fBitmap.get();
+ sk_sp<SkImage> image = (i & 0x01) ? fCheckerboard : fBitmap;
SkIRect cropRect = SkIRect::MakeXYWH(i * 12,
i * 8,
image->width() - i * 8,
image->height() - i * 12);
SkImageFilter::CropRect rect(SkRect::Make(cropRect));
- sk_sp<SkImageFilter> tileInput(SkImageSource::Create(image));
+ sk_sp<SkImageFilter> tileInput(SkImageSource::Make(image));
SkScalar dx = SkIntToScalar(i*5);
SkScalar dy = SkIntToScalar(i*10);
paint.setImageFilter(SkOffsetImageFilter::Make(dx, dy, std::move(tileInput), &rect));
- DrawClippedImage(canvas, image, paint, 1, cropRect);
+ DrawClippedImage(canvas, image.get(), paint, 1, cropRect);
canvas->translate(SkIntToScalar(image->width() + MARGIN), 0);
}
« no previous file with comments | « gm/imagesource2.cpp ('k') | gm/resizeimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698