blob: a476cf99ffd2f1fa6deb0654b69f5a9fff467a86 [file] [log] [blame]
load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_filegroup", "split_srcs_and_hdrs")
licenses(["notice"])
exports_files_legacy()
CORE_FILES = [
"SkImage.cpp",
"SkImage_Base.cpp",
"SkImage_Base.h",
"SkImage_Lazy.cpp",
"SkImage_Lazy.h",
"SkImage_Raster.cpp",
"SkImage_Raster.h",
"SkRescaleAndReadPixels.cpp",
"SkRescaleAndReadPixels.h",
"SkSurface.cpp",
"SkSurface_Base.h",
"SkSurface_Base.cpp",
"SkSurface_Null.cpp",
"SkSurface_Raster.cpp",
"SkSurface_Raster.h",
]
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,
)
skia_filegroup(
name = "android_srcs",
srcs = ["SkImage_AndroidFactories.cpp"],
)
# Not referenced by Bazel target.
# File group use to export to //gn/gpu.gni:skia_metal_sources.
skia_filegroup(
name = "mtl_srcs",
srcs = ["SkSurface_GpuMtl.mm"],
)
skia_filegroup(
name = "srcs",
srcs = [":core_srcs"] + select({
"//src/gpu:has_gpu_backend": [":gpu_srcs"],
"//conditions:default": [],
}),
visibility = ["//src:__pkg__"],
)
skia_filegroup(
name = "private_hdrs",
srcs = [":core_hdrs"] + select({
"//src/gpu:has_gpu_backend": [":gpu_hdrs"],
"//conditions:default": [],
}),
visibility = ["//src:__pkg__"],
)