Go to file
Kevin Lubick 9cb74e9079 [bazel] Compile gms for wasm and WebGL
PS 1 is re-generating existing BUILD.bazel files
PS 2 is generating BUILD.bazel files for tests/gms
PS 3+ makes modifications to build all of the gms and tests.

It is recommended to view this CL with just a diff between
PS 2 and the end, due to the large amount of generated changes
in PS 1 and 2.

We make a filegroup for the gms and tests because they need
to be compiled as one large blob in order for the registries
to work. Maybe in the future we will break these up, but at least
for WASM/JS, the overhead of starting a browser for each new
test would likely grind things to a halt, so we just group them
all together for now. It's also the most similar to what we
currently do.

In gm/BUILD.bazel and tests/BUILD.bazel, we add a cc_library
that encapsulates all of the deps of the tests, so we can
easily include that the build. These were discovered via
trial and error, not anything automatic or systematic.

The is_skia_dev_build config_setting is very similar to the
GN equivalent from which it was based.

The list of gms and tests to skip (e.g. which are incompatible
with WASM) was determined by building the wasm bundle:

modules/canvaskit$ make bazel_gms_release
tools/run-wasm-gm-tests$ make run_local_debug
# Don't forget to click the button on the screen after the
# browser loads

This way of invoking the tests will be replace soon with
`bazel test <something>`. As such, I didn't bother fully
documenting the current way.

Suggested review order:
 - modules/canvaskit/BUILD.bazel taking note that we always
   use profiling-funcs to make the stacktraces human readable.
 - gm/BUILD.bazel and tests/BUILD.bazel to see the lists of
   gms/tests. Notice the tests are roughly partitioned because
   we don't support things like vulkan/PDF in the wasm build
   and we will want a way to not build certain tests for
   certain configurations
 - tools/* noting some of the cc_libraries added to make
   dependencies easier to add when needed.
 - All other files.

Change-Id: I43059cd93c28af1c4c12b93d6ebd9c46a12d381f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506256
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-09 18:56:17 +00:00
animations
bazel [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
bench Prepare to reenable unreachable-code warnings. 2022-02-04 21:45:39 +00:00
bin [sk] Update asset download references to use SK 2021-09-17 16:55:53 +00:00
build/fuchsia
build_overrides Add Abseil dependency for Dawn 2021-09-22 22:05:32 +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 demo excercising lots of text 2022-02-04 13:10:29 +00:00
dm Revert "Add kR8_unorm_SkColorType" 2022-02-09 18:46:11 +00:00
docker Switch skia-build-tools to debian11. 2022-01-28 16:51:06 +00:00
docs/examples Revert "Add kR8_unorm_SkColorType" 2022-02-09 18:46:11 +00:00
example [bazel] Use font manager in HelloWorld. 2022-01-11 16:22:52 +00:00
experimental [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
fuzz Add flatten and MakeFromBuffer to SkDescriptor 2022-02-09 16:00:24 +00:00
gm [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
gn Fix OverflowFloatLiteral test in OS X 10.12. 2022-02-09 15:13:39 +00:00
include [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
infra Revert "Add kR8_unorm_SkColorType" 2022-02-09 18:46:11 +00:00
modules [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
platform_tools Add regular expression capability to SKQP unittest filter 2022-01-25 21:39:44 +00:00
resources Fix OverflowFloatLiteral test in OS X 10.12. 2022-02-09 15:13:39 +00:00
samplecode Track min required segments in PatchWriter 2022-02-08 16:30:26 +00:00
site Update SkSL docs (isOpaque, folding) 2022-02-09 16:31:38 +00:00
specs [infra] Port serve.py from Python2 to 3 2021-08-31 15:28:19 +00:00
src [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
tests [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
third_party [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
toolchain [bazel] Regenerate files and build with c++17 2022-02-01 13:15:22 +00:00
tools [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
.bazelrc [canvaskit] Add more features to Bazel build 2022-02-04 21:33:20 +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
.gitignore Add .vscode to the default gitignore list. 2021-10-13 15:23:02 +00:00
.gn
.vpython [python3] Reland recipes -> python3 changes 2021-12-01 13:04:03 +00:00
AUTHORS Fix a null pointer bug in SkData::copyRange 2022-01-24 19:27:13 +00:00
BUILD.bazel [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
BUILD.gn Remove old test main (skia_test.cpp) 2022-02-08 17:06:47 +00:00
codereview.settings
CONTRIBUTING
CQ_COMMITTERS
DEPS Roll ANGLE from d635feb11520 to 71d06198c62b (8 revisions) 2022-02-09 05:28:39 +00:00
DIR_METADATA
go_repositories.bzl [bazel] Sketching out HelloWorld sk_app using GL 2022-01-11 13:06:19 +00:00
go.mod [bazel] Sketching out HelloWorld sk_app using GL 2022-01-11 13:06:19 +00:00
go.sum [bazel] Sketching out HelloWorld sk_app using GL 2022-01-11 13:06:19 +00:00
LICENSE
OWNERS [infra] Add wildcard OWNERS 2021-08-30 19:19:34 +00:00
PRESUBMIT.py Remove AUTHORS check from PRESUBMIT.py 2021-09-30 14:12:18 +00:00
public.bzl Remove old test main (skia_test.cpp) 2022-02-08 17:06:47 +00:00
README
README.chromium
RELEASE_NOTES.txt Revert "Change default of skia_use_wuffs to true" 2022-02-08 22:39:58 +00:00
whitespace.txt Push shaders.skia.org. 2022-01-19 21:46:16 +00:00
WORKSPACE.bazel [bazel] Add mirrors to every external dependency. 2022-01-13 15:53:27 +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.