summaryrefslogtreecommitdiffstats
path: root/libs/hwui/ResourceCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/ResourceCache.h')
-rw-r--r--libs/hwui/ResourceCache.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/hwui/ResourceCache.h b/libs/hwui/ResourceCache.h
index edd6331..c6cd7bf 100644
--- a/libs/hwui/ResourceCache.h
+++ b/libs/hwui/ResourceCache.h
@@ -23,6 +23,7 @@
#include <SkPath.h>
#include <utils/KeyedVector.h>
+#include <utils/Singleton.h>
#include <androidfw/ResourceTypes.h>
@@ -54,11 +55,14 @@ public:
ResourceType resourceType;
};
-class ANDROID_API ResourceCache {
-public:
+class ANDROID_API ResourceCache: public Singleton<ResourceCache> {
ResourceCache();
~ResourceCache();
+ friend class Singleton<ResourceCache>;
+
+public:
+
/**
* When using these two methods, make sure to only invoke the *Locked()
* variants of increment/decrementRefcount(), recyle() and destructor()