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

Unified Diff: src/image/SkImagePriv.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 | « src/image/SkImage.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImagePriv.h
diff --git a/src/image/SkImagePriv.h b/src/image/SkImagePriv.h
index d3b1c79a79903b5cd9d6b5362bc0f53552dbdced..afaf3f173619ef376afaada9946345dcf4d1f1d8 100644
--- a/src/image/SkImagePriv.h
+++ b/src/image/SkImagePriv.h
@@ -23,11 +23,14 @@ extern SkImage* SkNewImageFromPixelRef(const SkImageInfo&, SkPixelRef*,
* be shared if either the bitmap is marked as immutable, or canSharePixelRef
* is true.
*
+ * It is illegal to call this with a texture-backed bitmap.
+ *
* If the bitmap's colortype cannot be converted into a corresponding
* SkImageInfo, or the bitmap's pixels cannot be accessed, this will return
* NULL.
*/
-extern SkImage* SkNewImageFromBitmap(const SkBitmap&, bool canSharePixelRef, const SkSurfaceProps*);
+extern SkImage* SkNewImageFromRasterBitmap(const SkBitmap&, bool forceSharePixelRef,
+ const SkSurfaceProps*);
static inline size_t SkImageMinRowBytes(const SkImageInfo& info) {
size_t minRB = info.minRowBytes();
@@ -53,4 +56,6 @@ extern void SkTextureImageApplyBudgetedDecision(SkImage* textureImage);
// surface needs to perform a copy-on-write
extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture);
+GrTexture* GrDeepCopyTexture(GrTexture* src, bool isBudgeted);
+
#endif
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698