skia2/include
Michael Ludwig c98d5b6250 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>
2020-10-12 20:25:43 +00:00
..
android Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
c use pathbuilder 2020-08-17 22:05:00 +00:00
codec Reland "Add idea of DataType to SkYUVAPixmapInfo." 2020-09-03 18:05:17 +00:00
config rm SkPreConfig.h and SkPostConfig.h 2020-02-06 19:16:43 +00:00
core Remove SkSurface::MakeFromBackendTextureAsRenderTarget 2020-10-12 17:57:37 +00:00
docs Add appendNodeIdArray to avoid code duplication. 2020-06-23 14:25:33 +00:00
effects Expand image filter factories to accept more types for crop rects 2020-10-12 20:25:43 +00:00
encode Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
gpu Migrate gpu resource methods to GrDirectContext 2020-10-12 18:36:57 +00:00
pathops rm SkPreConfig.h and SkPostConfig.h 2020-02-06 19:16:43 +00:00
ports Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
private Add scratch msaa attachment creation to GrResourceProvider. 2020-10-12 20:22:13 +00:00
svg [svgcanvas] Add flag to suppress newlines and tabs in XML 2019-08-21 20:17:37 +00:00
third_party Roll skcms from c21106442079 to f73242142ce5 (1 revision) 2020-07-16 21:50:37 +00:00
utils Remove SkCanvas::getGrContext & GrRecordingContext::backdoor 2020-09-21 16:46:21 +00:00