diff options
author | reed <reed@google.com> | 2016-03-17 10:51:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-17 10:51:11 -0700 |
commit | 9ce9d6772df650ceb0511f275e1a83dffa78ff72 (patch) | |
tree | 1c0d54a75945863947490ec45cccf7c30eaa2ca4 /gm/imagefilterscropexpand.cpp | |
parent | 42d95a0afb26560586232961445ba36de387ca37 (diff) |
update callsites for Make image factories
not forced yet, as we still have the build-guard. waiting on chrome CL
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003
TBR=
Review URL: https://codereview.chromium.org/1810813003
Diffstat (limited to 'gm/imagefilterscropexpand.cpp')
-rw-r--r-- | gm/imagefilterscropexpand.cpp | 8 |
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) { |