Go to file
John Stiles fce87a43e6 Move store-cache handling into writeLabel.
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>
2022-04-19 15:17:01 +00:00
bazel [bazel] Run buildifier on BUILD.bazel files 2022-04-14 18:13:43 +00:00
bench mipMapped -> mipmapped 2022-04-18 14:26:19 +00:00
bin Handle 'aarch64' from platform.machine() 2022-03-01 13:10:59 +00:00
build/fuchsia [fuchsia] Fix fidlc command. 2020-06-10 03:29:24 +00:00
build_overrides Set dawn_vulkan_tools_dir in Dawn's GN overrides 2022-04-14 17:05:33 +00:00
client_utils/android Make class members that are static constexpr also be inline. 2021-10-11 16:22:59 +00:00
demos.skia.org [canvaskit] Add in fillText to spreadsheet demo for comparison 2022-02-15 15:35:43 +00:00
dm [graphite] update SKPSrc to call makeTextureImage 2022-04-18 14:28:42 +00:00
docker [infra] Avoid timeouts in CreateDockerImage_Skia_WASM_Release 2022-04-08 12:26:54 +00:00
docs/examples Reland "Add kR8_unorm_SkColorType" 2022-02-10 18:00:19 +00:00
example [bazel] Run buildifier on BUILD.bazel files 2022-04-14 18:13:43 +00:00
experimental Finish GrMipMapped->GrMipmapped 2022-04-15 15:43:52 +00:00
fuzz Finish GrMipMapped->GrMipmapped 2022-04-15 15:43:52 +00:00
gm mipMapped -> mipmapped 2022-04-18 14:26:19 +00:00
gn Remove complex path simplification code. 2022-04-19 12:51:35 +00:00
include Update Skia milestone to 103 2022-04-18 18:47:43 +00:00
infra Update SKP version 2022-04-17 08:12:37 +00:00
modules mipMapped -> mipmapped 2022-04-18 14:26:19 +00:00
platform_tools [includes] Prepare for moving SkColorSpace to forward declare 2022-03-31 19:50:10 +00:00
resources Fix update-fuzzer script to allow non-UTF8 data. 2022-04-18 12:10:05 +00:00
samplecode Move all Ganesh source files into ganesh subdirectory. 2022-04-07 21:06:50 +00:00
site [bazel] Remove outdated docs 2022-04-18 15:04:01 +00:00
specs [infra] Port serve.py from Python2 to 3 2021-08-31 15:28:19 +00:00
src Move store-cache handling into writeLabel. 2022-04-19 15:17:01 +00:00
tests Move store-cache handling into writeLabel. 2022-04-19 15:17:01 +00:00
third_party Revert "Update VMA to latest version." 2022-04-19 14:49:08 +00:00
toolchain [bazel] Run buildifier on BUILD.bazel files 2022-04-14 18:13:43 +00:00
tools Remove complex path simplification code. 2022-04-19 12:51:35 +00:00
.bazelrc [sksl] Make sksl tracing optional 2022-04-12 13:59:25 +00:00
.bazelversion [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
.clang-format no more bin packing in .clang-format 2021-03-04 17:22:50 +00:00
.clang-tidy Disable ClangTidy namespace comments for short blocks. 2020-08-24 14:01:22 +00:00
.gitignore Add .vscode to the default gitignore list. 2021-10-13 15:23:02 +00:00
.gn Reland "Set GN's script_executable to "python3"" 2022-04-07 20:11:27 +00:00
.vpython [python3] Reland recipes -> python3 changes 2021-12-01 13:04:03 +00:00
AUTHORS Remove obsolete sk_cf_obj 2022-03-11 05:59:16 +00:00
BUILD.bazel [bazel] Run buildifier on BUILD.bazel files 2022-04-14 18:13:43 +00:00
BUILD.gn [sksl] Make sksl tracing optional 2022-04-12 13:59:25 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll ANGLE from 3636d129ee9c to 197100880118 (5 revisions) 2022-04-19 05:29:37 +00:00
DIR_METADATA Move metadata in OWNERS files to DIR_METADATA files 2021-02-02 23:41:54 +00:00
go_repositories.bzl [infra] Update dep of infra repo 2022-04-08 17:25:24 +00:00
go.mod [infra] Update dep of infra repo 2022-04-08 17:25:24 +00:00
go.sum [infra] Update dep of infra repo 2022-04-08 17:25:24 +00:00
LICENSE LICENSE file: clean up 2019-11-22 21:59:03 +00:00
OWNERS [infra] Add wildcard OWNERS 2021-08-30 19:19:34 +00:00
OWNERS.android Update OWNERS.android with more details 2022-03-16 18:13:33 +00:00
package-lock.json [bazel] Make custom karma_test rule 2022-02-23 14:53:01 +00:00
package.json [bazel] Make custom karma_test rule 2022-02-23 14:53:01 +00:00
PRESUBMIT.py [bazel] Add RBE support using hermetic Linux Clang toolchain 2022-03-28 13:56:16 +00:00
public.bzl [bazel] Trim down public.bzl 2022-04-15 14:57:01 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt SkCanvas::kStrict_SrcRectConstraint disables mipmapping. 2022-04-06 17:11:47 +00:00
requirements.txt add Mac hash for MarkupSafe requirements 2022-04-13 15:39:27 +00:00
whitespace.txt Push shaders.skia.org. 2022-01-19 21:46:16 +00:00
WORKSPACE.bazel [bazel] Sketch out changes for Mac toolchain 2022-04-08 13:35:44 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.