| Index: include/core/SkImageFilter.h
|
| diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
|
| index 4f33f54b6d03a83542811ed1382d2f43a6a2c04d..0f52b69b84ba458772ad816c105f3953df6f8397 100644
|
| --- a/include/core/SkImageFilter.h
|
| +++ b/include/core/SkImageFilter.h
|
| @@ -223,10 +223,25 @@ protected:
|
| // no inputs.
|
| virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const;
|
|
|
| - // Applies "matrix" to the crop rect, and sets "rect" to the intersection of
|
| - // "rect" and the transformed crop rect. If there is no overlap, returns
|
| - // false and leaves "rect" unchanged.
|
| - bool applyCropRect(SkIRect* rect, const SkMatrix& matrix) const;
|
| + /** Computes source bounds as the src bitmap bounds offset by srcOffset.
|
| + * Apply the transformed crop rect to the bounds if any of the
|
| + * corresponding edge flags are set. Intersects the result against the
|
| + * 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;
|
| +
|
| + /** 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
|
| + * bitmap in "result" and pads the edges with transparent black. In that
|
| + * case, the srcOffset is modified to be the same as the bounds, since no
|
| + * further adjustment is needed by the caller. This version should only
|
| + * 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;
|
|
|
| /**
|
| * Returns true if the filter can be expressed a single-pass
|
|
|