blob: 5fb2ef364a80bf8ebe616c706e3c130b1809e09d [file] [log] [blame]
load("//bazel:macros.bzl", "exports_files_legacy", "split_srcs_and_hdrs")
licenses(["notice"])
exports_files_legacy()
CORE_FILES = [
"SkImage.cpp",
"SkImage_Base.h",
"SkImage_Lazy.cpp",
"SkImage_Lazy.h",
"SkImage_Raster.cpp",
"SkReadPixelsRec.h",
"SkRescaleAndReadPixels.cpp",
"SkRescaleAndReadPixels.h",
"SkSurface.cpp",
"SkSurface_Base.h",
"SkSurface_Raster.cpp",
]
split_srcs_and_hdrs(
name = "core",
files = CORE_FILES,
)
GPU_FILES = [
"SkImage_Gpu.cpp",
"SkImage_Gpu.h",
"SkImage_GpuBase.cpp",
"SkImage_GpuBase.h",
"SkImage_GpuYUVA.cpp",
"SkImage_GpuYUVA.h",
"SkSurface_Gpu.cpp",
"SkSurface_Gpu.h",
]
split_srcs_and_hdrs(
name = "gpu",
files = GPU_FILES,
)
# Not referenced by Bazel target.
# File group use to export to //gn/gpu.gni:skia_metal_sources.
filegroup(
name = "mtl_srcs",
srcs = ["SkSurface_GpuMtl.mm"],
)
filegroup(
name = "srcs",
srcs = [":core_srcs"] + select({
"//src/gpu:has_gpu_backend": [":gpu_srcs"],
"//conditions:default": [],
}),
visibility = ["//src:__pkg__"],
)
filegroup(
name = "private_hdrs",
srcs = [":core_hdrs"] + select({
"//src/gpu:has_gpu_backend": [":gpu_hdrs"],
"//conditions:default": [],
}),
visibility = ["//src:__pkg__"],
)