fce87a43e6
Previously, every expression/statement type was responsible for pruning or clearing the store-cache when branches were involved. This was difficult to reason about and easy to get wrong, particularly if the details are not fresh in your mind. Now, `writeLabel` takes care of the details for you. Pass in the location of the branch(es) which use the label, and the proper cache updating behavior will occur automatically. Some of the label enum types are not strictly necessary and exist for the benefit of a reader. Specifically: - `kBranchlessBlock` and `kBranchIsOnPreviousLine` are synonyms - `kBranchIsBelow` and `kBranchesOnBothSides` are also synonyms The hope is that extra enum names will be easier for a reader to follow, versus fewer but very-verbose enum names (like `kBranchIsBelowOrOnBothSides`). This change earned some very minor switch-related dividends. Previously, every label in a switch was treated as a forward-branch, but in fact, the very first label in a switch is privileged. This is because we are branching from the previous line, and the store cache is trustworthy in this case. (Versus "branching from above," where the store cache needs to be pruned before it can be trusted.) Change-Id: I38b539069c22be9f0777b632f60f0eab2409d687 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531540 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> |
||
---|---|---|
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 | ||
toolchain | ||
tools | ||
.bazelrc | ||
.bazelversion | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
.vpython | ||
AUTHORS | ||
BUILD.bazel | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
DIR_METADATA | ||
go_repositories.bzl | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
OWNERS.android | ||
package-lock.json | ||
package.json | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
requirements.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.