Index: include/core/SkImageFilter.h |
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h |
index 0595010c6fba0321262feca28b887ce3bf272649..398d3224b159adf865835424d3cbd31b8efc2ba9 100644 |
--- a/include/core/SkImageFilter.h |
+++ b/include/core/SkImageFilter.h |
@@ -227,7 +227,13 @@ public: |
virtual void computeFastBounds(const SkRect&, SkRect*) const; |
// Can this filter DAG compute the resulting bounds of an object-space rectangle? |
- bool canComputeFastBounds() const; |
+ virtual bool canComputeFastBounds() const; |
+ |
+ /** |
+ * If this filter can be represented by another filter + a localMatrix, return that filter, |
+ * else return null. |
+ */ |
+ virtual SkImageFilter* newWithLocalMatrix(const SkMatrix& localMatrix) const; |
/** |
* Create an SkMatrixImageFilter, which transforms its input by the given matrix. |
@@ -345,8 +351,8 @@ protected: |
* context's clipBounds, and returns the result in "bounds". If there is |
* no intersection, returns false and leaves "bounds" unchanged. |
*/ |
- bool applyCropRect(const Context&, const SkBitmap& src, const SkIPoint& srcOffset, |
- SkIRect* bounds) const; |
+ virtual bool applyCropRect(const Context&, const SkBitmap& src, const SkIPoint& srcOffset, |
+ SkIRect* bounds) const; |
/** Same as the above call, except that if the resulting crop rect is not |
* entirely contained by the source bitmap's bounds, it creates a new |
@@ -356,8 +362,8 @@ protected: |
* be used by filters which are not capable of processing a smaller |
* source bitmap into a larger destination. |
*/ |
- bool applyCropRect(const Context&, Proxy* proxy, const SkBitmap& src, SkIPoint* srcOffset, |
- SkIRect* bounds, SkBitmap* result) const; |
+ virtual bool applyCropRect(const Context&, Proxy* proxy, const SkBitmap& src, |
+ SkIPoint* srcOffset, SkIRect* bounds, SkBitmap* result) const; |
/** |
* Returns true if the filter can be expressed a single-pass |
@@ -385,11 +391,13 @@ protected: |
*/ |
virtual bool affectsTransparentBlack() const; |
+ virtual bool usesSrcInput() const { return fUsesSrcInput; } |
+ |
private: |
friend class SkGraphics; |
- static void PurgeCache(); |
+ friend class SkLocalMatrixImageFilter; |
- bool usesSrcInput() const { return fUsesSrcInput; } |
+ static void PurgeCache(); |
typedef SkFlattenable INHERITED; |
int fInputCount; |