Chromium Code Reviews| Index: include/core/SkSurface.h |
| diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h |
| index 45262d78e63d3d30351c43ccd22ae3c2442ad0a3..fcbc1bfcec81c6786b30ce1a4dcb9c220debf1ce 100644 |
| --- a/include/core/SkSurface.h |
| +++ b/include/core/SkSurface.h |
| @@ -228,13 +228,24 @@ public: |
| SkSurface* newSurface(const SkImageInfo&); |
| /** |
| + * In rare instances a client may want a unique copy of the SkSurface's contents in an image |
| + * snapshot. This enum can be used to enforce that the image snapshot's backing store is not |
| + * shared with another image snapshot or the surface's backing store. This is generally more |
| + * expensive. |
| + */ |
| + enum ForceUnique { |
| + kNo_ForceUnique, |
| + kYes_ForceUnique |
| + }; |
| + |
| + /** |
| * Returns an image of the current state of the surface pixels up to this |
| * point. Subsequent changes to the surface (by drawing into its canvas) |
| * will not be reflected in this image. If a copy must be made the Budgeted |
| * parameter controls whether it counts against the resource budget |
| * (currently for the gpu backend only). |
| */ |
| - SkImage* newImageSnapshot(Budgeted = kYes_Budgeted); |
| + SkImage* newImageSnapshot(Budgeted = kYes_Budgeted, ForceUnique = kNo_ForceUnique); |
|
reed1
2016/02/15 21:32:13
Crud. I think its cruddy when we have more than on
|
| /** |
| * Though the caller could get a snapshot image explicitly, and draw that, |