Expand image filter factories to accept more types for crop rects

The original SkIRect* crop rect argument was a little too onerous.
First, as a pointer, it required you to declare your crop rect separately
just to take a pointer to it. Now, you can pass an SkIRect or SkRect in
directly when you are explicitly constructing a cropped filter.

Second, the crop rect is transformed by the same matrix as the other
filter parameters, so it can be scaled and translated. Allowing SkRect
instead of just SkIRect gives more precision and flexibility for local
coordinate systems. Now a crop rect could be defined to be from [-.5, .5]
and still map to real pixels after transformation (this was a request
from the skia-discuss mailing list, and also better matches the SVG spec).

The crop rect argument was always meant to be a convenience, since I
plan to refactor cropping into an indenendent image filter that will
give more explicit control over when the crop is applied in the DAG.
To maintain the convenience for the factories, the constructors of
the new CropRect type are not explicit so that callers don't ever need
to concern themselves with it.

Bug: skia:9296
Change-Id: I29a684cb925f1fca4dabc803114ab2b125660aaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324622
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 05b3001..a7e970d 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -9,6 +9,12 @@
 
   * <insert new release notes here>
 
+  * SkImageFilters::Foo() factory functions now accept SkIRect, SkRect, and optional SkIRect* or
+    SkRect*, instead of previously just the optional SkIRect*. Internally, the crop rects are stored
+    as floats to allow for fractional crops to be defined in the local coordinate system (before
+    transformation by the canvas matrix).
+    https://review.skia.org/324622
+
   * Add new SkImageFilters::Shader factory and deprecate SkImageFilters::Paint factory. All
     supported/valid Paint() filters can be represented more cleanly as a Shader image filter.
     https://review.skia.org/323680