3ae071e4ea
Previously, `takeOwnership` was overloaded to take Symbols or IRNodes. However, Symbols themselves are a subclass of IRNode, so attempting to call `takeOwnership` with any subclass of Symbol was considered ambiguous. This was fixed by splitting the API into `takeOwnershipOfSymbol` and `takeOwnershipOfIRNode`, letting the caller decide explicitly rather than forcing the compiler to choose. These APIs also returned their input back to the caller as `const Symbol*` and `const IRNode*`, although generally the caller actually wanted the object in its original type. This meant most uses of the return type were immediately cast back to their actual type. (Some callers accidentally stripped const as well, although it would be wrong to mutate an object in the symbol table.) Added templates to allow the input to be returned as its original type, and removed the now-unnecessary casts. The String `takeOwnership` call was updated to `takeOwnershipOfString` for consistency with its peers. Change-Id: Ib44a08097d89caec2c30deb4a25463330b7d2bf2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307841 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> |
||
---|---|---|
animations | ||
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 | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
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 |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.