| Index: include/core/SkDiscardableMemory.h
|
| diff --git a/src/core/SkDiscardableMemory.h b/include/core/SkDiscardableMemory.h
|
| similarity index 79%
|
| rename from src/core/SkDiscardableMemory.h
|
| rename to include/core/SkDiscardableMemory.h
|
| index e1634eef4f4013a5945f4cb64f67b09c17d16271..f3159fe2af0c46261814b84a65d4ac020216c7b3 100644
|
| --- a/src/core/SkDiscardableMemory.h
|
| +++ b/include/core/SkDiscardableMemory.h
|
| @@ -8,6 +8,7 @@
|
| #ifndef SkDiscardableMemory_DEFINED
|
| #define SkDiscardableMemory_DEFINED
|
|
|
| +#include "SkRefCnt.h"
|
| #include "SkTypes.h"
|
|
|
| /**
|
| @@ -15,7 +16,6 @@
|
| * embedder.
|
| */
|
| class SK_API SkDiscardableMemory {
|
| -
|
| public:
|
| /**
|
| * Factory method that creates, initializes and locks an SkDiscardableMemory
|
| @@ -23,6 +23,17 @@ 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;
|
| + private:
|
| + typedef SkRefCnt INHERITED;
|
| + };
|
| +
|
| /** Must not be called while locked.
|
| */
|
| virtual ~SkDiscardableMemory() {}
|
|
|