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

Unified Diff: include/core/SkImage.h

Issue 1217053003: add SkImage::NewFromBitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « gm/colormatrix.cpp ('k') | src/core/SkRecorder.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 7557e8e41dd9ffcad9f6e62a633ccb76b8472e70..41a1bd85272f163bb5e5a2135ad353ff92cf897b 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -62,6 +62,12 @@ public:
RasterReleaseProc, ReleaseContext);
/**
+ * Construct a new image from the specified bitmap. If the bitmap is marked immutable, and
+ * its pixel memory is shareable, it may be shared instead of copied.
+ */
+ static SkImage* NewFromBitmap(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.
« no previous file with comments | « gm/colormatrix.cpp ('k') | src/core/SkRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698