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

Unified Diff: include/lazy/SkImageCache.h

Issue 84783002: SkDiscardableMemory::Factory class (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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
Index: include/lazy/SkImageCache.h
diff --git a/include/lazy/SkImageCache.h b/include/lazy/SkImageCache.h
index 6d30ae73f06337afc744690aee43414d5e742ea9..4b074fe01301ec949fe12c88c6c20f1cc8a68799 100644
--- a/include/lazy/SkImageCache.h
+++ b/include/lazy/SkImageCache.h
@@ -8,19 +8,20 @@
#ifndef SkImageCache_DEFINED
#define SkImageCache_DEFINED
-#include "SkRefCnt.h"
+#include "SkDiscardableMemory.h"
#include "SkTypes.h"
/**
* Interface for a cache that manages pixel memory.
*/
-class SkImageCache : public SkRefCnt {
-
+class SkImageCache : public SkDiscardableMemory::Factory {
public:
SK_DECLARE_INST_COUNT(SkImageCache)
typedef intptr_t ID;
+ virtual SkDiscardableMemory* create(size_t bytes) SK_OVERRIDE;
scroggo 2013/12/02 19:00:09 Need this be virtual? Can you imagine a different
+
/**
* Allocate memory whose lifetime is managed by the cache. On success, MUST be balanced with a
* call to releaseCache and a call to throwAwayCache.
@@ -127,6 +128,7 @@ public:
#endif
private:
- typedef SkRefCnt INHERITED;
+ typedef SkDiscardableMemory::Factory INHERITED;
};
-#endif // SkImageCache_DEFINED
+#endif // SkImageCache_DEFINED
+

Powered by Google App Engine
This is Rietveld 408576698