skia2/third_party
Kevin Lubick 14abec45f0 [bazel] Add support for Dawn (via Vulkan)
sk_app has existing support for Dawn on top of Vulkan, and
this adds support to build //example:hello_world_dawn and
get this to run on Linux.

Dawn depends on Tint and abseil-cpp. Tint further depends on
spirv_tools and spirv_headers (for writing to the SPIR-V format).
Dawn and Tint only have GN and CMake support, so we need to make
our Bazel rules for them (see //third_party/BUILD.bazel).

abseil-cpp and the SPIR-V libraries have Bazel support, so we
can just include them (see //WORKSPACE.bazel). It is important
that @spirv_headers be called that exactly because @spirv_tools
depends on it by that name.

The hand-crafted cc_library rules for Dawn and Tint were produced
by reading the appropriate GN files and using the parts necessary
for a supporting Vulkan+Linux. If we use Dawn for other backends
(e.g. WebGPU), we will need to expand the Bazel rules. One day,
we might contribute the Bazel rules to Dawn and Tint so they
can support them and avoid breaking us if new files are added.

Suggested Review Order
 - bazel/common_config_settings/BUILD.bazel to see introduction
   of new select-able option "has_gpu_backend" which cleans up
   some of our code that is enabled for any GPU backend.
 - src/*/BUILD.bazel to see has_gpu_backend rolled out.
 - WORKSPACE.bazel to see DEPS declared there (using the files
   in third_party/externals, which are brought in via
   tools/git-sync-deps).
 - third_party/BUILD.bazel which adds Dawn and Tint rules.
   It may be helpful to look in third_party/externals for
   the Dawn [1] and Tint [2] GN files. Especially interesting
   are the Python scripts [3] Dawn uses to generate some
   header and source files.
 - All other files.

[1] https://dawn.googlesource.com/dawn/+/d9f22ce0346b222759d5510be3d1cd93caa5ab86/src/dawn/native/BUILD.gn#183
[2] https://dawn.googlesource.com/tint/+/453d5ae84ec30ab51ac592c13d472412ae8b5fc9/src/tint/BUILD.gn#174
[3] https://dawn.googlesource.com/dawn/+/d9f22ce0346b222759d5510be3d1cd93caa5ab86/generator/dawn_json_generator.py#774
Change-Id: Ied5b162045d8e841b9666457f0158457e2b078d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516996
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-22 13:05:52 +00:00
..
angle2 Port to ANGLE's GN files 2020-09-11 15:22:34 +00:00
brotli [canvaskit] Add support for woff2 fonts 2020-11-10 15:07:26 +00:00
cpu-features reformat GN files 2020-04-01 23:23:03 +00:00
d3d12allocator Add AMD allocator to D3D12 backend. 2020-09-23 21:22:52 +00:00
dng_sdk Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
etc1 Update etc1.cpp. 2020-12-16 17:57:26 +00:00
expat Add LICENSE file to third_party/expat/include/expat_config/ 2021-05-27 18:15:18 +00:00
freetype2 Reland "Build CanvasKit using GN/Ninja" 2022-02-15 16:31:10 +00:00
harfbuzz Roll HarfBuzz from a8b7f188 to 8d1b000a (207 commits) 2022-03-02 22:34:16 +00:00
highway Add MVP implementation of JPEGXL decoder. 2022-02-02 15:17:14 +00:00
icu Reland "Build CanvasKit using GN/Ninja" 2022-02-15 16:31:10 +00:00
imgui Revert "Spruce up SkSL slide with a much nicer editor" 2022-01-07 15:56:16 +00:00
libjpeg-turbo Reland "Build CanvasKit using GN/Ninja" 2022-02-15 16:31:10 +00:00
libjxl Add MVP implementation of JPEGXL decoder. 2022-02-02 15:17:14 +00:00
libmicrohttpd GN/Win: everything links on my machine. 2016-10-12 16:39:42 +00:00
libpng Reland "Build CanvasKit using GN/Ninja" 2022-02-15 16:31:10 +00:00
libwebp Reland "Build CanvasKit using GN/Ninja" 2022-02-15 16:31:10 +00:00
lua avoid using tmpnam() in Lua 2018-02-01 22:39:59 +00:00
native_app_glue reformat GN files 2020-04-01 23:23:03 +00:00
oboe Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
piex Reland "Build SkRawCodec in GN" 2016-10-31 09:02:57 -07:00
sfntly reformat GN files 2020-04-01 23:23:03 +00:00
skcms Roll skcms from 3fa993c258a9 to 30c8e303800c (2 revisions) 2022-01-22 00:10:20 +00:00
spirv-cross Roll Dawn and add dependencies 2020-03-30 18:52:06 +00:00
vulkanmemoryallocator Add flag that can be used to disable std::shared_mutex use in VMA. 2021-11-12 01:35:08 +00:00
wuffs Inclusive language 2020-07-24 13:33:53 +00:00
zlib Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
BUILD.bazel [bazel] Add support for Dawn (via Vulkan) 2022-03-22 13:05:52 +00:00
BUILD.gn GN: Android 2016-08-25 14:50:44 -07:00
file_map_for_bazel.json [bazel] Support Vulkan 2022-03-08 21:21:17 +00:00
README BUG=skia:5602 2016-09-02 11:19:34 -07:00
third_party.gni Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00

The third_party directory contains a set of dependencies from outside sources
that are needed to build various components and tools within Skia.  

Some of these dependencies reside within the Skia repo, while others are pulled 
from other repositories and placed in the third_party/externals directory
during build. These external dependencies are defined in a DEPS file.

Products in third_party are subject to their own respective license terms.  The
license for each project should be included in the source itself via a license
header or file.  If the source itself does not include a license header or file,
create a README that refers to reliable documentation of the project's license
terms on the web.