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

Unified Diff: src/core/SkDiscardableMemory.h

Issue 103033002: Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase one last time 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..f3159fe2af0c46261814b84a65d4ac020216c7b3 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"
/**
@@ -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() {}
« 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