aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefilterscropexpand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/imagefilterscropexpand.cpp')
-rw-r--r--gm/imagefilterscropexpand.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gm/imagefilterscropexpand.cpp b/gm/imagefilterscropexpand.cpp
index 185bbde0a6..f3ca4d32a6 100644
--- a/gm/imagefilterscropexpand.cpp
+++ b/gm/imagefilterscropexpand.cpp
@@ -46,12 +46,12 @@ protected:
SkRect::Make(SkIRect::MakeXYWH(10, 10, 44, 44)),
SkImageFilter::CropRect::kHasAll_CropEdge);
- SkAutoTUnref<SkImage> gradientCircle(MakeGradientCircle(64, 64));
+ sk_sp<SkImage> gradientCircle(MakeGradientCircle(64, 64));
SkBitmap checkerboard;
MakeCheckerboard(&checkerboard);
SkAutoTUnref<SkImageFilter> gradientCircleSource(
- SkImageSource::Create(gradientCircle));
+ SkImageSource::Create(gradientCircle.get()));
SkAutoTUnref<SkImageFilter> noopCropped(
SkOffsetImageFilter::Create(0, 0, nullptr, &cropRect));
SkScalar sk255 = SkIntToScalar(255);
@@ -141,7 +141,7 @@ private:
}
}
- static SkImage* MakeGradientCircle(int width, int height) {
+ static sk_sp<SkImage> MakeGradientCircle(int width, int height) {
SkScalar x = SkIntToScalar(width / 2);
SkScalar y = SkIntToScalar(height / 2);
SkScalar radius = SkMinScalar(x, y) * 0.8f;
@@ -156,7 +156,7 @@ private:
2, SkShader::kClamp_TileMode));
canvas->drawCircle(x, y, radius, paint);
- return surface->newImageSnapshot();
+ return surface->makeImageSnapshot();
}
static void Draw(SkCanvas* canvas, const SkBitmap& bitmap, const SkRect& rect, SkImageFilter* filter) {