Index: include/core/SkPixelRef.h |
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h |
index fc0feb042adb59a2e5ff002e5f181b3375d5a65a..e65f4a04c5b5e1538c291e69ff1d1d920130f82f 100644 |
--- a/include/core/SkPixelRef.h |
+++ b/include/core/SkPixelRef.h |
@@ -364,4 +364,15 @@ private: |
typedef SkFlattenable INHERITED; |
}; |
+class SkPixelRefFactory : public SkRefCnt { |
+public: |
+ /** |
+ * Allocate a new pixelref matching the specified ImageInfo, allocating |
+ * the memory for the pixels. If the ImageInfo requires a ColorTable, |
+ * the pixelref will ref() the colortable. |
+ * On failure return NULL. |
+ */ |
+ virtual SkPixelRef* create(const SkImageInfo&, SkColorTable*) = 0; |
+}; |
+ |
#endif |