Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: tests/ScaledImageCache.cpp

Issue 511283002: rename ScaledImageCache to ResourceCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ImageCacheTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ScaledImageCache.cpp
diff --git a/tests/ScaledImageCache.cpp b/tests/ScaledImageCache.cpp
index 276a3cc17a4549b1d39d09af1277ab0b576a88a8..8088d093d3427670316969eac5926ee5e2ec3994 100644
--- a/tests/ScaledImageCache.cpp
+++ b/tests/ScaledImageCache.cpp
@@ -41,32 +41,32 @@ static bool test_scaled_image_cache_useage() {
}
// http://crbug.com/389439
-DEF_TEST(ScaledImageCache_SingleAllocationByteLimit, reporter) {
- size_t originalByteLimit = SkGraphics::GetImageCacheTotalByteLimit();
+DEF_TEST(ResourceCache_SingleAllocationByteLimit, reporter) {
+ size_t originalByteLimit = SkGraphics::GetResourceCacheTotalByteLimit();
size_t originalAllocationLimit =
- SkGraphics::GetImageCacheSingleAllocationByteLimit();
+ SkGraphics::GetResourceCacheSingleAllocationByteLimit();
size_t size = kBitmapSize * kScale * kBitmapSize * kScale
* SkColorTypeBytesPerPixel(kN32_SkColorType);
- SkGraphics::SetImageCacheTotalByteLimit(0); // clear cache
- SkGraphics::SetImageCacheTotalByteLimit(2 * size);
- SkGraphics::SetImageCacheSingleAllocationByteLimit(0); // No limit
+ SkGraphics::SetResourceCacheTotalByteLimit(0); // clear cache
+ SkGraphics::SetResourceCacheTotalByteLimit(2 * size);
+ SkGraphics::SetResourceCacheSingleAllocationByteLimit(0); // No limit
REPORTER_ASSERT(reporter, test_scaled_image_cache_useage());
- SkGraphics::SetImageCacheTotalByteLimit(0); // clear cache
- SkGraphics::SetImageCacheTotalByteLimit(2 * size);
- SkGraphics::SetImageCacheSingleAllocationByteLimit(size * 2); // big enough
+ SkGraphics::SetResourceCacheTotalByteLimit(0); // clear cache
+ SkGraphics::SetResourceCacheTotalByteLimit(2 * size);
+ SkGraphics::SetResourceCacheSingleAllocationByteLimit(size * 2); // big enough
REPORTER_ASSERT(reporter, test_scaled_image_cache_useage());
- SkGraphics::SetImageCacheTotalByteLimit(0); // clear cache
- SkGraphics::SetImageCacheTotalByteLimit(2 * size);
- SkGraphics::SetImageCacheSingleAllocationByteLimit(size / 2); // too small
+ SkGraphics::SetResourceCacheTotalByteLimit(0); // clear cache
+ SkGraphics::SetResourceCacheTotalByteLimit(2 * size);
+ SkGraphics::SetResourceCacheSingleAllocationByteLimit(size / 2); // too small
REPORTER_ASSERT(reporter, !test_scaled_image_cache_useage());
- SkGraphics::SetImageCacheSingleAllocationByteLimit(originalAllocationLimit);
- SkGraphics::SetImageCacheTotalByteLimit(originalByteLimit);
+ SkGraphics::SetResourceCacheSingleAllocationByteLimit(originalAllocationLimit);
+ SkGraphics::SetResourceCacheTotalByteLimit(originalByteLimit);
}
« no previous file with comments | « tests/ImageCacheTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698