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

Unified Diff: src/core/SkResourceCache.cpp

Issue 576763002: allow SkBitmapCache to operate on a local instance, for testability (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use __VA_ARGS__ explicitly to make MSVC happy Created 6 years, 3 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/SkResourceCache.h ('k') | tests/SkResourceCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkResourceCache.cpp
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp
index 732557d0a55c14b6744621e6b37f90f663e257c3..3098a9a2a13cf678f21cd2144d07e5575fe4483b 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -432,6 +432,11 @@ size_t SkResourceCache::SetTotalByteLimit(size_t newLimit) {
return get_cache()->setTotalByteLimit(newLimit);
}
+SkResourceCache::DiscardableFactory SkResourceCache::GetDiscardableFactory() {
+ SkAutoMutexAcquire am(gMutex);
+ return get_cache()->discardableFactory();
+}
+
SkBitmap::Allocator* SkResourceCache::GetAllocator() {
SkAutoMutexAcquire am(gMutex);
return get_cache()->allocator();
« no previous file with comments | « src/core/SkResourceCache.h ('k') | tests/SkResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698