Index: src/core/SkDiscardableMemory.h |
diff --git a/src/core/SkDiscardableMemory.h b/src/core/SkDiscardableMemory.h |
index e1634eef4f4013a5945f4cb64f67b09c17d16271..97464092bad07b7b8f57f8e8102c28b5f4c8b026 100644 |
--- a/src/core/SkDiscardableMemory.h |
+++ b/src/core/SkDiscardableMemory.h |
@@ -8,6 +8,7 @@ |
#ifndef SkDiscardableMemory_DEFINED |
#define SkDiscardableMemory_DEFINED |
+#include "SkRefCnt.h" |
#include "SkTypes.h" |
/** |
@@ -23,6 +24,16 @@ public: |
*/ |
static SkDiscardableMemory* Create(size_t bytes); |
+ /** |
+ * Factory class that creates, initializes and locks an SkDiscardableMemory |
+ * object. If either of these steps fails, a NULL pointer will be returned. |
+ */ |
+ class Factory : public SkRefCnt { |
+ public: |
+ virtual SkDiscardableMemory* create(size_t bytes) = 0; |
+ virtual ~Factory() { } |
reed1
2013/12/04 20:09:47
Unneeded, since SkRefCnt has a virtual destructor
|
+ }; |
+ |
/** Must not be called while locked. |
*/ |
virtual ~SkDiscardableMemory() {} |