Index: tests/ResourceCacheTest.cpp |
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp |
index f6c8b1da1a1c9033d2419edf6d3609f0007595b7..78c11243de08de8c8e745fdc87761e76e74e4727 100644 |
--- a/tests/ResourceCacheTest.cpp |
+++ b/tests/ResourceCacheTest.cpp |
@@ -26,16 +26,17 @@ static void test_cache(skiatest::Reporter* reporter, |
src.eraseColor(SK_ColorBLACK); |
size_t srcSize = src.getSize(); |
- size_t initialCacheSize = context->getGpuTextureCacheBytes(); |
+ size_t initialCacheSize; |
+ context->getResourceCacheUsage(NULL, &initialCacheSize); |
int oldMaxNum; |
size_t oldMaxBytes; |
- context->getTextureCacheLimits(&oldMaxNum, &oldMaxBytes); |
+ context->getResourceCacheLimits(&oldMaxNum, &oldMaxBytes); |
// Set the cache limits so we can fit 10 "src" images and the |
// max number of textures doesn't matter |
size_t maxCacheSize = initialCacheSize + 10*srcSize; |
- context->setTextureCacheLimits(1000, maxCacheSize); |
+ context->setResourceCacheLimits(1000, maxCacheSize); |
SkBitmap readback; |
readback.allocN32Pixels(size.width(), size.height()); |
@@ -47,13 +48,14 @@ static void test_cache(skiatest::Reporter* reporter, |
// "modify" the src texture |
src.notifyPixelsChanged(); |
- size_t curCacheSize = context->getGpuTextureCacheBytes(); |
+ size_t curCacheSize; |
+ context->getResourceCacheUsage(NULL, &curCacheSize); |
// we should never go over the size limit |
REPORTER_ASSERT(reporter, curCacheSize <= maxCacheSize); |
} |
- context->setTextureCacheLimits(oldMaxNum, oldMaxBytes); |
+ context->setResourceCacheLimits(oldMaxNum, oldMaxBytes); |
} |
class TestResource : public GrCacheable { |