Index: include/core/SkImage.h |
diff --git a/include/core/SkImage.h b/include/core/SkImage.h |
index 96de89ef87c28de932cc478018f4168021199034..111478ccd9276bf1b1a425f19cfac586882cf82c 100644 |
--- a/include/core/SkImage.h |
+++ b/include/core/SkImage.h |
@@ -304,6 +304,27 @@ public: |
*/ |
bool isLazyGenerated() const; |
+ /** |
+ * Apply the specified filter to this image, and return the result as a new image. |
+ * |
+ * if forceResultToOriginalSize is true, then the resulting image will be the same size as the |
+ * src, regardless of the normal output of the filter. |
+ * |
robertphillips
2015/10/12 16:43:32
need -> needed
reed1
2015/10/12 18:02:19
Done.
|
+ * If offset is non-null, it is set to the relative offset need to draw the resulting image |
+ * in the same logical place as the original. |
+ * |
+ * e.g. |
+ * If the filter makes the result larger by a margin of 4 the output would be: |
robertphillips
2015/10/12 16:43:32
odd mix of ->/. and =/==
reed1
2015/10/12 17:08:45
Written from the caller's perspective, where resul
|
+ * result->width() = this->width + 8 |
+ * result->height() = this->height + 8 |
+ * offset.x() == -4 |
+ * offset.y() == -4 |
+ * |
+ * If the filter fails to create a resulting image, null is returned. |
+ */ |
+ SkImage* applyFilter(SkImageFilter* filter, SkIPoint* offset, |
+ bool forceResultToOriginalSize) const; |
+ |
protected: |
SkImage(int width, int height, uint32_t uniqueID); |