2022-04-29 15:52:17 +00:00
|
|
|
load("//bazel:macros.bzl", "enforce_iwyu_on_package", "exports_files_legacy", "generated_cc_atom")
|
2022-01-11 12:35:26 +00:00
|
|
|
load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags")
|
|
|
|
|
2022-04-14 18:01:45 +00:00
|
|
|
licenses(["notice"])
|
|
|
|
|
2022-05-02 13:38:15 +00:00
|
|
|
exports_files_legacy()
|
|
|
|
|
2022-04-29 14:23:46 +00:00
|
|
|
enforce_iwyu_on_package()
|
|
|
|
|
2022-01-11 12:35:26 +00:00
|
|
|
cc_binary_with_flags(
|
2022-03-08 20:27:12 +00:00
|
|
|
name = "hello_world_gl",
|
2022-01-11 12:35:26 +00:00
|
|
|
srcs = [
|
|
|
|
"//example:HelloWorld_src",
|
|
|
|
],
|
2022-01-11 14:17:52 +00:00
|
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
2022-01-11 12:35:26 +00:00
|
|
|
set_flags = {
|
2022-01-11 14:17:52 +00:00
|
|
|
# Use the GL backend with the normal GL standard (as opposed to WebGL or GLES)
|
2022-01-11 12:35:26 +00:00
|
|
|
"gpu_backend": [
|
|
|
|
"gl_backend",
|
|
|
|
],
|
|
|
|
"with_gl_standard": [
|
|
|
|
"gl_standard",
|
|
|
|
],
|
2022-01-11 14:17:52 +00:00
|
|
|
# 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",
|
|
|
|
],
|
2022-01-11 12:35:26 +00:00
|
|
|
},
|
|
|
|
deps = [
|
|
|
|
"//:skia_core",
|
|
|
|
"//tools/sk_app",
|
|
|
|
],
|
|
|
|
)
|
2022-01-06 19:26:59 +00:00
|
|
|
|
2022-03-08 20:27:12 +00:00
|
|
|
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",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-03-21 17:06:32 +00:00
|
|
|
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",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-04-08 17:45:45 +00:00
|
|
|
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",
|
|
|
|
# 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",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-01-11 14:17:52 +00:00
|
|
|
# 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`
|
|
|
|
# =========================================================================================
|
|
|
|
|
2022-01-06 19:26:59 +00:00
|
|
|
generated_cc_atom(
|
|
|
|
name = "HelloWorld_hdr",
|
|
|
|
hdrs = ["HelloWorld.h"],
|
|
|
|
visibility = ["//:__subpackages__"],
|
|
|
|
deps = [
|
2022-04-29 14:23:46 +00:00
|
|
|
"//include/core:SkScalar_hdr",
|
|
|
|
"//include/core:SkTypes_hdr",
|
2022-01-06 19:26:59 +00:00
|
|
|
"//tools/sk_app:Application_hdr",
|
|
|
|
"//tools/sk_app:Window_hdr",
|
2022-04-29 14:23:46 +00:00
|
|
|
"//tools/skui:ModifierKey_hdr",
|
2022-01-06 19:26:59 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
generated_cc_atom(
|
|
|
|
name = "HelloWorld_src",
|
|
|
|
srcs = ["HelloWorld.cpp"],
|
|
|
|
visibility = ["//:__subpackages__"],
|
|
|
|
deps = [
|
|
|
|
":HelloWorld_hdr",
|
|
|
|
"//include/core:SkCanvas_hdr",
|
2022-04-29 14:23:46 +00:00
|
|
|
"//include/core:SkColor_hdr",
|
|
|
|
"//include/core:SkFontTypes_hdr",
|
2022-01-06 19:26:59 +00:00
|
|
|
"//include/core:SkFont_hdr",
|
|
|
|
"//include/core:SkGraphics_hdr",
|
2022-04-29 14:23:46 +00:00
|
|
|
"//include/core:SkPaint_hdr",
|
|
|
|
"//include/core:SkPoint_hdr",
|
|
|
|
"//include/core:SkRect_hdr",
|
|
|
|
"//include/core:SkShader_hdr",
|
|
|
|
"//include/core:SkString_hdr",
|
2022-01-06 19:26:59 +00:00
|
|
|
"//include/core:SkSurface_hdr",
|
2022-04-29 14:23:46 +00:00
|
|
|
"//include/core:SkTileMode_hdr",
|
2022-01-06 19:26:59 +00:00
|
|
|
"//include/effects:SkGradientShader_hdr",
|
2022-04-29 14:23:46 +00:00
|
|
|
"//tools/sk_app:DisplayParams_hdr",
|
2022-01-06 19:26:59 +00:00
|
|
|
],
|
|
|
|
)
|
2022-04-08 17:45:45 +00:00
|
|
|
|
|
|
|
generated_cc_atom(
|
|
|
|
name = "VulkanBasic_src",
|
|
|
|
srcs = ["VulkanBasic.cpp"],
|
|
|
|
visibility = ["//:__subpackages__"],
|
|
|
|
deps = [
|
2022-04-29 14:23:46 +00:00
|
|
|
"//include/core:SkAlphaType_hdr",
|
2022-04-08 17:45:45 +00:00
|
|
|
"//include/core:SkCanvas_hdr",
|
2022-04-29 14:23:46 +00:00
|
|
|
"//include/core:SkColorType_hdr",
|
|
|
|
"//include/core:SkColor_hdr",
|
|
|
|
"//include/core:SkImageInfo_hdr",
|
|
|
|
"//include/core:SkRefCnt_hdr",
|
2022-04-08 17:45:45 +00:00
|
|
|
"//include/core:SkSurface_hdr",
|
2022-04-29 14:23:46 +00:00
|
|
|
"//include/core:SkTypes_hdr",
|
2022-04-08 17:45:45 +00:00
|
|
|
"//include/gpu:GrDirectContext_hdr",
|
|
|
|
"//include/gpu/vk:GrVkBackendContext_hdr",
|
|
|
|
"//include/gpu/vk:GrVkExtensions_hdr",
|
|
|
|
"//tools/gpu/vk:VkTestUtils_hdr",
|
|
|
|
],
|
|
|
|
)
|