2022-05-27 18:47:29 +00:00
|
|
|
load("//bazel:macros.bzl", "exports_files_legacy")
|
|
|
|
load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags")
|
|
|
|
|
|
|
|
licenses(["notice"])
|
|
|
|
|
|
|
|
exports_files_legacy()
|
|
|
|
|
|
|
|
cc_binary_with_flags(
|
|
|
|
name = "hello_world_gl",
|
|
|
|
testonly = True,
|
|
|
|
srcs = [
|
|
|
|
"HelloWorld.cpp",
|
|
|
|
"HelloWorld.h",
|
|
|
|
],
|
|
|
|
# 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 = [
|
2022-06-01 18:45:46 +00:00
|
|
|
"//:skia_public",
|
2022-06-21 18:38:54 +00:00
|
|
|
] + select({
|
|
|
|
"@platforms//os:macos": ["//tools/sk_app:sk_app_objc"],
|
|
|
|
"@platforms//os:linux": ["//tools/sk_app:sk_app"],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
2022-05-27 18:47:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary_with_flags(
|
|
|
|
name = "hello_world_vulkan",
|
|
|
|
testonly = True,
|
|
|
|
srcs = [
|
|
|
|
"HelloWorld.cpp",
|
|
|
|
"HelloWorld.h",
|
|
|
|
],
|
|
|
|
# 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 = [
|
2022-06-01 18:45:46 +00:00
|
|
|
"//:skia_public",
|
2022-05-27 18:47:29 +00:00
|
|
|
"//tools/sk_app",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary_with_flags(
|
|
|
|
name = "hello_world_dawn",
|
|
|
|
testonly = True,
|
|
|
|
srcs = [
|
|
|
|
"HelloWorld.cpp",
|
|
|
|
"HelloWorld.h",
|
|
|
|
],
|
|
|
|
# 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 = [
|
2022-06-01 18:45:46 +00:00
|
|
|
"//:skia_public",
|
2022-05-27 18:47:29 +00:00
|
|
|
"//tools/sk_app",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary_with_flags(
|
|
|
|
name = "vulkan_basic",
|
|
|
|
testonly = True,
|
|
|
|
srcs = [
|
|
|
|
"VulkanBasic.cpp",
|
|
|
|
],
|
|
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
|
|
|
set_flags = {
|
|
|
|
"gpu_backend": [
|
|
|
|
"vulkan_backend",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
deps = [
|
2022-06-01 18:45:46 +00:00
|
|
|
"//:skia_public",
|
|
|
|
"//include/third_party/vulkan",
|
2022-05-27 18:47:29 +00:00
|
|
|
# This DEPS is for the utility in the demo for creating a vulkan context.
|
|
|
|
# Outside clients would not need it.
|
|
|
|
"//tools/gpu/vk:testutils",
|
|
|
|
],
|
|
|
|
)
|