aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkImageFilter.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 0915b90714..b16fb0f7a2 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -90,28 +90,21 @@ public:
virtual bool asNewCustomStage(GrCustomStage** stage, GrTexture*) const;
/**
- * Experimental.
- *
- * If the filter can be expressed as a gaussian-blur, return true and
- * set the sigma to the values for horizontal and vertical.
- */
- virtual bool asABlur(SkSize* sigma) const;
-
- /**
- * Experimental.
- *
- * If the filter can be expressed as an erode, return true and
- * set the radius in X and Y.
+ * Returns true if the filter can be processed on the GPU. This is most
+ * often used for multi-pass effects, where intermediate results must be
+ * rendered to textures. For single-pass effects, use asNewCustomStage().
+ * The default implementation returns false.
*/
- virtual bool asAnErode(SkISize* radius) const;
+ virtual bool canFilterImageGPU() const;
/**
- * Experimental.
- *
- * If the filter can be expressed as a dilation, return true and
- * set the radius in X and Y.
+ * Process this image filter on the GPU. texture is the source texture
+ * for processing, and rect is the effect region to process. The
+ * function must allocate a new texture of at least rect width/height
+ * size, and return it to the caller. The default implementation returns
+ * NULL.
*/
- virtual bool asADilate(SkISize* radius) const;
+ virtual GrTexture* onFilterImageGPU(GrTexture* texture, const SkRect& rect);
protected:
SkImageFilter() {}