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

Unified Diff: src/core/SkResourceCache.h

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/SkBitmapCache.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkResourceCache.h
diff --git a/src/core/SkResourceCache.h b/src/core/SkResourceCache.h
index d4e1dfa3766fb74a94181ef5ff01092283a84107..52196985d392cd327516f3dd97a7853955ba8c9a 100644
--- a/src/core/SkResourceCache.h
+++ b/src/core/SkResourceCache.h
@@ -126,6 +126,11 @@ public:
static void PurgeAll();
/**
+ * Returns the DiscardableFactory used by the global cache, or NULL.
+ */
+ static DiscardableFactory GetDiscardableFactory();
+
+ /**
* Use this allocator for bitmaps, so they can use ashmem when available.
* Returns NULL if the ResourceCache has not been initialized with a DiscardableFactory.
*/
@@ -189,6 +194,7 @@ public:
this->purgeAsNeeded(true);
}
+ DiscardableFactory discardableFactory() const { return fDiscardableFactory; }
SkBitmap::Allocator* allocator() const { return fAllocator; };
/**
« no previous file with comments | « src/core/SkBitmapCache.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698