Chromium Code Reviews| 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 |
| + |