diff options
author | Hal Canary <halcanary@google.com> | 2016-11-04 16:26:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-07 15:22:49 +0000 |
commit | cefc43112c8f6fe3702facb89447bdfcc2715345 (patch) | |
tree | c3e11ec30078b70ebe3af01d2e841dac572d1112 /gm/image_pict.cpp | |
parent | 2db83612576d64935bd88747cf9855e79cad70d4 (diff) |
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 <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'gm/image_pict.cpp')
-rw-r--r-- | gm/image_pict.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<SkColorTable> ct(new SkColorTable(colors, count)); - bm2.allocPixels(info, nullptr, ct); + sk_sp<SkColorTable> 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<GrContext> fCtx; - SkAutoTUnref<GrTexture> fTexture; + sk_sp<GrContext> fCtx; + sk_sp<GrTexture> fTexture; }; static SkImageGenerator* make_tex_generator(GrContext* ctx, SkPicture* pic) { const SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); |