Chromium Code Reviews| Index: include/core/SkImage.h |
| diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
| index 6070b6bf6bfefdd50ba5bc07ca8e118f54ef9165..d4a468d592e13105c70f4364679be398b733cb04 100644 |
| --- a/include/core/SkImage.h |
| +++ b/include/core/SkImage.h |
| @@ -124,6 +124,19 @@ 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 is intersected with the original src-bounds. If that |
| + * intersection is empty, NULL is returned, else the intersection is used as the src for |
| + * the scaling. |
| + * |
| + * 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; |
|
bsalomon
2014/12/22 21:31:06
Should there be control over filtering mode/qualit
reed1
2014/12/22 21:39:47
Good question -- in my next rev. I'm proposing cha
|
| + |
| protected: |
| SkImage(int width, int height) : |
| fWidth(width), |