Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 5ce32eafb7adbb4cd799358250944fb84808452c..9cc26ed4be3dff13d9a2986a3785ca4ce448d4cb 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -63,6 +63,15 @@ public: |
*/ |
static SkImage* NewFromGenerator(SkImageGenerator*); |
+ /** |
+ * Construct a new SkImage based on the specified encoded data. Returns NULL on failure, |
+ * which can mean that the format of the encoded data was not recognized/supported. |
+ * |
+ * Regardless of success or failure, the caller is responsible for managing their ownership |
+ * of the data. |
+ */ |
+ static SkImage* NewFromData(SkData* data); |
+ |
int width() const { return fWidth; } |
int height() const { return fHeight; } |
uint32_t uniqueID() const { return fUniqueID; } |