f8f23b2030
This removes hacking the canvas CTM and wrapping the paint's image filter in a special MatrixTransform that computed a post-transform instead of its documented pre-transform effect. Performance-wise, the computed layer sizes should be about the same, but we avoid one less render target switch because we apply the transformation while drawing to the dst device, vs. transforming into another temporary layer and then drawing that to the dst device. Several important changes in behavior here: 1. The DeviceCM record no longer has a stashed matrix to restore and holds its restoration paint directly. 2. Devices for image filter inputs can now have device-to-global transforms that are not integer translates. 3. The MatrixTransform hack punted when there was perspective because it could produce excessively large temporary images, but the new version appears to work around that. We now impose a maximum layer size to protect against that and automatically scale the layer to prevent it. Perspective image filters otherwise now draw correctly. 6. Updated layer sizing code to use the new image filter APIs 7. Updated backdrop filter and restore filters to go through the same code paths, although restore filters skip the intermediate image transform. - layer bounds and transforms now go through the updated skif API and is hopefully more straight forward to understand. 8. Now we can optimize root color filter nodes of a filter DAG, even if the entire DAG can't be represented as a color filter. The last node is pulled off and composed with the restoration paint instead. Bug: skia:9074,skia:9283 Change-Id: I1fa1d50135b9d6d453b02f89aa3cc3b54deab678 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328376 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> |
||
---|---|---|
animations | ||
bazel | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
client_utils/android | ||
demos.skia.org | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.bazelignore | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.bazel | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
whitespace.txt | ||
WORKSPACE.bazel |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.