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

Unified Diff: tests/CachedDecodingPixelRefTest.cpp

Issue 132803005: SkOnce: add option to call another cleanup function once at exit. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add static Created 6 years, 11 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 | « src/core/SkScaledImageCache.cpp ('k') | tests/OnceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CachedDecodingPixelRefTest.cpp
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index d725ff5fc9c57b7390f0ced1ca77f4f80f17dd5c..9ac5f8139259f2261e5fb98a5d6be76ada9b6dab 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -142,12 +142,6 @@ static void test_three_encodings(skiatest::Reporter* reporter,
}
}
-static void purge_global_scaled_image_cache() {
- size_t byteLimit = SkScaledImageCache::GetByteLimit();
- SkScaledImageCache::SetByteLimit(0);
- SkScaledImageCache::SetByteLimit(byteLimit);
-}
-
////////////////////////////////////////////////////////////////////////////////
static bool install_skCachingPixelRef(SkData* encoded, SkBitmap* dst) {
return SkCachingPixelRef::Install(
@@ -169,7 +163,6 @@ static bool install_skDiscardablePixelRef(SkData* encoded, SkBitmap* dst) {
*/
DEF_TEST(DecodingImageGenerator, reporter) {
test_three_encodings(reporter, install_skCachingPixelRef);
- purge_global_scaled_image_cache();
test_three_encodings(reporter, install_skDiscardablePixelRef);
}
@@ -302,8 +295,6 @@ DEF_TEST(DiscardableAndCachingPixelRef, reporter) {
check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType,
reporter, kSkCaching_PixelRefType, NULL);
- purge_global_scaled_image_cache();
-
check_pixelref(TestImageGenerator::kFailGetInfo_TestType,
reporter, kSkDiscardable_PixelRefType, NULL);
check_pixelref(TestImageGenerator::kFailGetPixels_TestType,
« no previous file with comments | « src/core/SkScaledImageCache.cpp ('k') | tests/OnceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698