aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-12-04 14:27:01 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-04 20:01:09 +0000
commitf7ee95c3d0b317e527314329437dea0b3ab9b422 (patch)
tree5de261a21c46f163e4de2c127ab3a343dae5a243 /include
parent1ef80942b3b2414c862eb1e9ae301442b447c089 (diff)
helper api to force a raster image
Bug: skia: Change-Id: I53f3d426e97f446b17dc965fa8dd6d6aae441ac9 Reviewed-on: https://skia-review.googlesource.com/79901 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkImage.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 1d725c237d..75d7083805 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -384,6 +384,14 @@ public:
* the pixels fails). Otherwise, it returns the original image.
*/
sk_sp<SkImage> makeNonTextureImage() const;
+
+ /**
+ * If this image is already backed by raster (i.e. peekPixels would succeed), then this just
+ * returns itself. If not, this attempts to create a raster version of this image and returns
+ * that, or nullptr if that fails.
+ */
+ sk_sp<SkImage> makeRasterImage() const;
+
/**
* Apply a given image filter to this image, and return the filtered result.
*