SkDiscardableMemoryPool to abstract class
Motivation - we want to keep our public headers small.
R=scroggo@google.com, reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/223403012
git-svn-id: http://skia.googlecode.com/svn/trunk@14063 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/ImageCacheTest.cpp b/tests/ImageCacheTest.cpp
index 43a5e70..92d0b51 100644
--- a/tests/ImageCacheTest.cpp
+++ b/tests/ImageCacheTest.cpp
@@ -81,6 +81,7 @@
static SkDiscardableMemoryPool* gPool;
static SkDiscardableMemory* pool_factory(size_t bytes) {
+ SkASSERT(gPool);
return gPool->create(bytes);
}
@@ -92,8 +93,9 @@
test_cache(reporter, cache, true);
}
{
- SkDiscardableMemoryPool pool(defLimit);
- gPool = &pool;
+ SkAutoTUnref<SkDiscardableMemoryPool> pool(
+ SkDiscardableMemoryPool::Create(defLimit, NULL));
+ gPool = pool.get();
SkScaledImageCache cache(pool_factory);
test_cache(reporter, cache, true);
}