diff options
Diffstat (limited to 'include/core/SkImage.h')
-rw-r--r-- | include/core/SkImage.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 5ce32eafb7..9cc26ed4be 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; } |