aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkDevice.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-06 14:43:09 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-06 14:43:09 +0000
commitb55deeb1c7c692023603639a9b29c0e3de124eac (patch)
tree700cd48c2047c233ab2a8ed27331b48eff2e517f /include/core/SkDevice.h
parent3c10a0871b1a664441ff53df9a8c57005e247116 (diff)
add allowImageFilter() so a device can allow/disallow filters
(esp. for printing) git-svn-id: http://skia.googlecode.com/svn/trunk@2981 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkDevice.h')
-rw-r--r--include/core/SkDevice.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 8c351f9e51..c026a4b493 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -310,9 +310,18 @@ protected:
virtual void unlockPixels();
/**
+ * Returns true if the device allows processing of this imagefilter. If
+ * false is returned, then the filter is ignored. This may happen for
+ * some subclasses that do not support pixel manipulations after drawing
+ * has occurred (e.g. printing). The default implementation returns true.
+ */
+ virtual bool allowImageFilter(SkImageFilter*);
+
+ /**
* Override and return true for filters that the device handles
* intrinsically. Returning false means call the filter.
- * Default impl returns false.
+ * Default impl returns false. This will only be called if allowImageFilter()
+ * returned true.
*/
virtual bool filterImage(SkImageFilter*, const SkBitmap& src,
const SkMatrix& ctm,