aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects/SkRectShaderImageFilter.h
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-15 15:25:18 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-15 15:25:18 +0000
commit33e88b7b93e3b5282b205359368990d3f8b3fd04 (patch)
treea0d8903b1a71d351fbb80a9558b6a82c0d3296aa /include/effects/SkRectShaderImageFilter.h
parent0d0bb83c05f5b12cae529ebe1911645062a175cb (diff)
SkRectShaderImageFilter: add a new factory method which takes a CropRect.
This will become the preferred API, and the old Create method will be deprecated. R=reed@google.com, reed BUG= Review URL: https://codereview.chromium.org/26220004 git-svn-id: http://skia.googlecode.com/svn/trunk@11773 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects/SkRectShaderImageFilter.h')
-rw-r--r--include/effects/SkRectShaderImageFilter.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/effects/SkRectShaderImageFilter.h b/include/effects/SkRectShaderImageFilter.h
index 5ad11c104c..9a2913c03b 100644
--- a/include/effects/SkRectShaderImageFilter.h
+++ b/include/effects/SkRectShaderImageFilter.h
@@ -15,12 +15,18 @@ class SkShader;
class SK_API SkRectShaderImageFilter : public SkImageFilter {
public:
- /**
- * The SkShader object will have its refcnt increased as it becomes a member of the
- * SkRectShaderImageFilter object returned by this function. It cannot be NULL.
- * The region parameter is used to specify on which region the shader is applied.
+ /** Create a new image filter which fills the given rectangle with pixels
+ * produced by the given SkShader. If no rectangle is specified, an output
+ * is produced with the same bounds as the input primitive (even though
+ * the input primitive's pixels are not used for processing).
+ * @param s Shader to call for processing. Cannot be NULL. Will be
+ * ref'ed by the new image filter.
+ * @param rect Rectangle of output pixels in which to apply the shader.
+ * If NULL or a given crop edge is not specified, the source
+ * primitive's bounds are used instead.
*/
- static SkRectShaderImageFilter* Create(SkShader* s, const SkRect& rect);
+ /* DEPRECATED */ static SkRectShaderImageFilter* Create(SkShader* s, const SkRect& rect);
+ static SkRectShaderImageFilter* Create(SkShader* s, const CropRect* rect = NULL);
virtual ~SkRectShaderImageFilter();
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter)