From cefc43112c8f6fe3702facb89447bdfcc2715345 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Fri, 4 Nov 2016 16:26:16 -0400 Subject: gm: s/SkAutoTUnref/sk_sp/ GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4434 Change-Id: Ib2bea321617a17012190b33f2c7c439a5b6b3025 Reviewed-on: https://skia-review.googlesource.com/4434 Commit-Queue: Ben Wagner Reviewed-by: Ben Wagner --- gm/image_pict.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gm/image_pict.cpp') diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index 2e2c284351..8cbd287f3b 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp @@ -189,8 +189,8 @@ static SkImageGenerator* make_ctable_generator(GrContext*, SkPicture* pic) { SkImageInfo info = SkImageInfo::Make(100, 100, kIndex_8_SkColorType, kPremul_SkAlphaType); SkBitmap bm2; - SkAutoTUnref ct(new SkColorTable(colors, count)); - bm2.allocPixels(info, nullptr, ct); + sk_sp ct(new SkColorTable(colors, count)); + bm2.allocPixels(info, nullptr, ct.get()); for (int y = 0; y < info.height(); ++y) { for (int x = 0; x < info.width(); ++x) { *bm2.getAddr8(x, y) = find_closest(*bm.getAddr32(x, y), colors, count); @@ -239,12 +239,12 @@ protected: desc.fHeight = subset->height(); GrTexture* dst = fCtx->textureProvider()->createTexture(desc, SkBudgeted::kNo); - fCtx->copySurface(dst, fTexture, *subset, SkIPoint::Make(0, 0)); + fCtx->copySurface(dst, fTexture.get(), *subset, SkIPoint::Make(0, 0)); return dst; } private: - SkAutoTUnref fCtx; - SkAutoTUnref fTexture; + sk_sp fCtx; + sk_sp fTexture; }; static SkImageGenerator* make_tex_generator(GrContext* ctx, SkPicture* pic) { const SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); -- cgit v1.2.3