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

Unified Diff: src/core/SkDiscardableMemory.h

Issue 103033002: Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: cleanup test Created 7 years 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
« no previous file with comments | « include/lazy/SkPurgeableImageCache.h ('k') | src/images/SkDecodingImageGenerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {}
« no previous file with comments | « include/lazy/SkPurgeableImageCache.h ('k') | src/images/SkDecodingImageGenerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698