887ac49f9e
This definitely simplifies the drawing code, but always copies the input SkPaint so that it can be modified if necessary. If we get perf hits, we can just revert this. We could keep it using a copy-on-write, but with this change, I believe we've removed the majority of instances of SkCopyOnWrite<SkPaint> inside SkCanvas. There's just one LatticePaint struct that's overly complex for what it does that I can clean up next. A middle ground would be to keep the copy-on-write behavior, but drop the branch on image-filter. Given the lack of perf needle movement on some of the other simplifications that avoided technically unnecessary paint copies, I doubt it's worth the complexity. As part of this change, since the draw calls no longer branch based on the presence of an image filter, the AutoLayerForImageFilter takes over calling predrawNotify() in its various forms. We don't have to follow through with that, if we'd rather have the notification be called out explicitly within the draw call itself. I've found it easy to forget to call predrawNotify(), or keep it in the right place while updating draws so I may be biased. Bug: skia:10987 Change-Id: I5204c175aae691f82cc45f3d9a04ef64dee5d80f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342920 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Mike Klein <mtklein@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.