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

Unified Diff: include/core/SkImage.h

Issue 834633006: add ImageGenerator::NewFromData to porting layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add helper for SkInstallDiscardablePixelRef(SkData*, ...) Created 5 years, 11 months 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
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; }
« no previous file with comments | « gyp/images.gyp ('k') | include/core/SkImageGenerator.h » ('j') | include/core/SkImageGenerator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698