05a777d442
This is an alternative approach to https://skia-review.googlesource.com/c/skia/+/234896 It inverts the templates and coordinate spaces, so that each coordinate space is defined by a struct that accepts the SkIRect/etc. type as an argument. For parameter space and device space, the only exposed functionality is holding on to the coordinates and moving into and out of the layer space (using the Mapping type, which now encapsulates the definition of parameter, layer, and device space for a given CTM). The LayerSpace struct has specialized definitions for each of the 6 key geometric types, exposes accessors/mutators and operations like join/intersect that work on appropriate layer-space geometry. FilterResult and Context have been updated to use these new types, although they no longer take a Usage enum. If this strategy works, FilterResult will be updated to have more utilities to operate and read from its image in layer-space so there won't be a need to have the image space (and the usage enum to differentiate between different image spaces). To further reinforce the differences between getInputBounds() and getOutputBounds() (which previously used Usage to do this), they now accept/return values in device and parameter space. This is no different than what SkCanvas would have done before calling the old functions, but now that work is owned by SkImageFilter (seems like a good thing), and achieves the same reinforcement. Change-Id: I8bebb9fadf6c8f2bd51fa863b2d6f2e4a33dd08b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244515 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> |
||
---|---|---|
.. | ||
toolchain | ||
__init__.py | ||
ar.py | ||
bench.gni | ||
BUILD.gn | ||
BUILDCONFIG.gn | ||
call.py | ||
checkdir.py | ||
codesign_ios.py | ||
compile_ib_files.py | ||
compile_processors.py | ||
core.gni | ||
cp.py | ||
create_sksl_enums.py | ||
effects_imagefilters.gni | ||
effects.gni | ||
find_headers.py | ||
find_ios_sysroot.py | ||
find_msvc.py | ||
flutter_defines.gni | ||
fuchsia_defines.gni | ||
gen_plist_ios.py | ||
gm.gni | ||
gn_meta_sln.py | ||
gn_to_bp_utils.py | ||
gn_to_bp.py | ||
gn_to_cmake.py | ||
gpu.gni | ||
highest_version_dir.py | ||
ios.gni | ||
is_clang.py | ||
make_gm_gni.py | ||
opts.gni | ||
pdf.gni | ||
push_to_android.py | ||
run_sksllex.py | ||
samples.gni | ||
shared_sources.gni | ||
skia.gni | ||
sksl.gni | ||
tests.gni | ||
utils.gni | ||
xps.gni |