skia2/tests/graphite
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
..
BackendTextureTest.cpp [graphite] Remove ref counting from Recorder. 2022-01-13 16:27:29 +00:00
BUILD.bazel [bazel] Compile gms for wasm and WebGL 2022-02-09 18:56:17 +00:00
ComboTest.cpp [graphite] Rearrange headers 2022-02-08 19:07:34 +00:00
CommandBufferTest.cpp [graphite] Rearrange headers 2022-02-08 19:07:34 +00:00
IntersectionTreeTest.cpp [graphite] Add an IntersectionTree class 2021-10-19 19:45:01 +00:00
MaskTest.cpp [graphite] Remove use of GraphiteTypesPriv and move to *Types in src. 2021-11-15 20:57:23 +00:00
MtlBackendTextureTest.mm [graphite] Add Context create/deleteBackendTexture calls. 2021-11-30 21:36:23 +00:00
RecorderTest.cpp [graphite] Remove ref counting from Recorder. 2022-01-13 16:27:29 +00:00
RectTest.cpp [graphite] Update Shape to use skgpu::Rect and float2 2021-10-19 23:25:48 +00:00
ShapeTest.cpp [graphite] Remove the skpu::geom namespace 2021-10-12 17:55:07 +00:00
TransformTest.cpp [graphite] Add Transform that wraps matrix, inverse, type and scale factors 2021-10-16 00:06:32 +00:00
UniformCacheTest.cpp [graphite] Add a means of accumulating multiple code snippets 2022-02-08 16:46:50 +00:00
UniformTest.cpp [graphite] Rearrange headers 2022-02-08 19:07:34 +00:00