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

Unified Diff: include/core/SkImage.h

Issue 465823003: SkImage::NewFromGenerator(SkImageGenerator*), and a unit test. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix ARGB/AGBR byte order bug (edit) Created 6 years, 4 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
« no previous file with comments | « gyp/core.gyp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 581129e7207fd58a3311f9d161a372a6eefdd46a..1316e2b595e9814749a0867e083a48be61196f98 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -16,6 +16,7 @@
class SkData;
class SkCanvas;
+class SkImageGenerator;
class SkPaint;
class GrContext;
class GrTexture;
@@ -47,6 +48,13 @@ public:
*/
static SkImage* NewTexture(const SkBitmap&);
+ /**
+ * Construct a new SkImage based on the given ImageGenerator.
+ * This function will always take ownership of the passed
+ * ImageGenerator. Returns NULL on error.
+ */
+ static SkImage* NewFromGenerator(SkImageGenerator*);
+
int width() const { return fWidth; }
int height() const { return fHeight; }
uint32_t uniqueID() const { return fUniqueID; }
« no previous file with comments | « gyp/core.gyp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698