aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImagePriv.h
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2015-07-07 06:11:19 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-07 06:11:20 -0700
commit5617900063f69754de62b8b12d32f6e36df14104 (patch)
tree07064e2e25565b7b6e4ee2b953ea9b2cde804091 /src/image/SkImagePriv.h
parent6f29a3c92c976017608a626d0449dda8b603277a (diff)
add SkImage::NewFromBitmap
Diffstat (limited to 'src/image/SkImagePriv.h')
-rw-r--r--src/image/SkImagePriv.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/image/SkImagePriv.h b/src/image/SkImagePriv.h
index d3b1c79a79..afaf3f1736 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