Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index ebc9a2939408ad113b14329d7545cb51a5b3279d..0c3b37db9266d436c0234fc7cd6c646926f247bd 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -64,6 +64,22 @@ public: |
*/ |
static SkImage* NewFromData(SkData* data); |
+ /** |
+ * Create a new image from the specified descriptor. Note - the caller is responsible for |
+ * managing the lifetime of the underlying platform texture. |
+ * |
+ * Will return NULL if the specified descriptor is unsupported. |
+ */ |
+ static SkImage* NewFromTexture(GrContext*, const GrBackendTextureDesc&); |
+ |
+ /** |
+ * Create a new image by copying the pixels from the specified descriptor. No reference is |
+ * kept to the original platform texture. |
+ * |
+ * Will return NULL if the specified descriptor is unsupported. |
+ */ |
+ static SkImage* NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&); |
+ |
int width() const { return fWidth; } |
int height() const { return fHeight; } |
uint32_t uniqueID() const { return fUniqueID; } |