Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 6070b6bf6bfefdd50ba5bc07ca8e118f54ef9165..2bb5e029a2b1d39649d6faec4b8a00c90695d458 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -124,6 +124,18 @@ public: |
*/ |
SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps* = NULL) const; |
+ /** |
+ * Return an image that is a rescale of this image (using newWidth, newHeight). |
+ * |
+ * If subset is NULL, then the entire original image is used as the src for the scaling. |
+ * If subset is not NULL, then it specifies subset of src-pixels used for scaling. If |
+ * subset extends beyond the bounds of the original image, then NULL is returned. |
+ * |
+ * Note: it is legal for the returned image to be the same instance as the src image |
+ * (if the new dimensions == the src dimensions and any subset encloses the entire src). |
+ */ |
+ SkImage* newImage(int newWidth, int newHeight, const SkIRect* subset = NULL) const; |
scroggo
2014/12/22 22:08:27
For use by Android, it might be nice to be able to
reed2
2014/12/24 19:47:26
For GPU images, it is hard to see how to supply th
scroggo
2014/12/30 11:04:40
Agreed. The more I think about it, the more I thin
|
+ |
protected: |
SkImage(int width, int height) : |
fWidth(width), |