6bc4bdf645
This removes the required dependency on our JSON code. In the Bazel rules, this dependency is pushed down into sksl instead of required by the cc_binary rules. It adds a stub version of SkVMDebugTrace.cpp and removes SkVMDebugTracePlayer unless the appropriate GN or Bazel flag is set (skia_enable_sksl_tracing and enable_sksl_tracing, respectively). There was an existing #define that CanvasKit used (CK_INCLUDE_SKSL_TRACE) and this was changed to SKSL_ENABLE_TRACING. Users of //:skia_core no longer need to specify a JSON dep, if sksl needs it (e.g. for tracing), then it will specify the dependency. Change-Id: I2fcd29cde118fc391c269ba2d8f8a40a6f164c99 Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528837 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
136 lines
3.8 KiB
Python
136 lines
3.8 KiB
Python
load("//bazel:macros.bzl", "generated_cc_atom")
|
|
load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags")
|
|
|
|
cc_binary_with_flags(
|
|
name = "hello_world_gl",
|
|
srcs = [
|
|
"//example:HelloWorld_src",
|
|
],
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
|
set_flags = {
|
|
# Use the GL backend with the normal GL standard (as opposed to WebGL or GLES)
|
|
"gpu_backend": [
|
|
"gl_backend",
|
|
],
|
|
"with_gl_standard": [
|
|
"gl_standard",
|
|
],
|
|
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
|
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
|
"fontmgr_factory": [
|
|
"custom_directory_fontmgr_factory",
|
|
],
|
|
},
|
|
deps = [
|
|
"//:skia_core",
|
|
"//tools/sk_app",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_flags(
|
|
name = "hello_world_vulkan",
|
|
srcs = [
|
|
"//example:HelloWorld_src",
|
|
],
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
|
set_flags = {
|
|
"gpu_backend": [
|
|
"vulkan_backend",
|
|
],
|
|
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
|
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
|
"fontmgr_factory": [
|
|
"custom_directory_fontmgr_factory",
|
|
],
|
|
},
|
|
deps = [
|
|
"//:skia_core",
|
|
"//tools/sk_app",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_flags(
|
|
name = "hello_world_dawn",
|
|
srcs = [
|
|
"//example:HelloWorld_src",
|
|
],
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
|
set_flags = {
|
|
"gpu_backend": [
|
|
"dawn_backend",
|
|
],
|
|
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
|
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
|
"fontmgr_factory": [
|
|
"custom_directory_fontmgr_factory",
|
|
],
|
|
},
|
|
deps = [
|
|
"//:skia_core",
|
|
"//tools/sk_app",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_flags(
|
|
name = "vulkan_basic",
|
|
srcs = [
|
|
"//example:VulkanBasic_src",
|
|
],
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
|
set_flags = {
|
|
"gpu_backend": [
|
|
"vulkan_backend",
|
|
],
|
|
},
|
|
deps = [
|
|
"//:skia_core",
|
|
"//src/utils:json_srcs",
|
|
# This DEPS is for the utility in the demo for creating a vulkan context.
|
|
# Outside clients would not need it.
|
|
"//tools/gpu/vk:VkTestUtils_src",
|
|
],
|
|
)
|
|
|
|
# Everything below this line is autogenerated by gazelle using the C++ plugin built here:
|
|
# https://github.com/google/skia-buildbot/tree/main/bazel/gazelle/cpp
|
|
# These can be regenerated (if needed) by navigating to //bazel and running `make generate`
|
|
# =========================================================================================
|
|
|
|
generated_cc_atom(
|
|
name = "HelloWorld_hdr",
|
|
hdrs = ["HelloWorld.h"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
"//tools/sk_app:Application_hdr",
|
|
"//tools/sk_app:Window_hdr",
|
|
],
|
|
)
|
|
|
|
generated_cc_atom(
|
|
name = "HelloWorld_src",
|
|
srcs = ["HelloWorld.cpp"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
":HelloWorld_hdr",
|
|
"//include/core:SkCanvas_hdr",
|
|
"//include/core:SkFont_hdr",
|
|
"//include/core:SkGraphics_hdr",
|
|
"//include/core:SkSurface_hdr",
|
|
"//include/effects:SkGradientShader_hdr",
|
|
],
|
|
)
|
|
|
|
generated_cc_atom(
|
|
name = "VulkanBasic_src",
|
|
srcs = ["VulkanBasic.cpp"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
"//include/core:SkCanvas_hdr",
|
|
"//include/core:SkSurface_hdr",
|
|
"//include/gpu:GrDirectContext_hdr",
|
|
"//include/gpu/vk:GrVkBackendContext_hdr",
|
|
"//include/gpu/vk:GrVkExtensions_hdr",
|
|
"//tools/gpu/vk:VkTestUtils_hdr",
|
|
],
|
|
)
|