From 342b7acc46550af5fbefc6f9313231ede11ed692 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Fri, 4 Nov 2016 11:49:42 -0400 Subject: tests: s/SkAutoTUnref/sk_sp/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4394 Change-Id: I088b3c6e2adff07abed1e8a50091cc0ec4a4109c Reviewed-on: https://skia-review.googlesource.com/4394 Reviewed-by: Ben Wagner Commit-Queue: Hal Canary --- tests/SkResourceCacheTest.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/SkResourceCacheTest.cpp') diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp index 615c7b4cd7..9275dff7d2 100644 --- a/tests/SkResourceCacheTest.cpp +++ b/tests/SkResourceCacheTest.cpp @@ -23,8 +23,8 @@ static void make_bitmap(SkBitmap* bitmap, const SkImageInfo& info, SkBitmap::All bitmap->setInfo(info); SkPMColor ctStorage[256]; memset(ctStorage, 0xFF, sizeof(ctStorage)); // init with opaque-white for the moment - SkAutoTUnref ctable(new SkColorTable(ctStorage, 256)); - bitmap->allocPixels(allocator, ctable); + sk_sp ctable(new SkColorTable(ctStorage, 256)); + bitmap->allocPixels(allocator, ctable.get()); } else if (allocator) { bitmap->setInfo(info); allocator->allocPixelRef(bitmap, 0); @@ -260,8 +260,7 @@ DEF_TEST(BitmapCache_discarded_bitmap, reporter) { testBitmapCache_discarded_bitmap(reporter, &cache, nullptr); } { - SkAutoTUnref pool( - SkDiscardableMemoryPool::Create(byteLimit, nullptr)); + sk_sp pool(SkDiscardableMemoryPool::Create(byteLimit, nullptr)); gPool = pool.get(); SkResourceCache::DiscardableFactory factory = pool_factory; SkResourceCache cache(factory); -- cgit v1.2.3