blob: 0279f9595bf86e7032e348a5b1a0916a92078b62 [file] [log] [blame]
load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_filegroup", "split_srcs_and_hdrs")
load("//bazel:flags.bzl", "selects")
licenses(["notice"])
exports_files_legacy()
# In own group for exporting to sksl.gni:skslc_deps.
CORE_SKSLC_FILES = [
"SkParse.cpp",
"SkOSPath.h",
"SkOSPath.cpp",
"SkVMVisualizer.cpp",
"SkVMVisualizer.h",
]
split_srcs_and_hdrs(
name = "core_skslc",
files = CORE_SKSLC_FILES,
)
CORE_FILES = [
"SkAnimCodecPlayer.cpp",
"SkBase64.cpp",
"SkBitSet.h",
"SkBlitterTrace.h",
"SkBlitterTraceCommon.h",
"SkCallableTraits.h",
"SkCamera.cpp",
"SkCanvasStack.cpp",
"SkCanvasStack.h",
"SkCanvasStateUtils.cpp",
"SkCharToGlyphCache.cpp",
"SkCharToGlyphCache.h",
"SkClipStackUtils.cpp",
"SkClipStackUtils.h",
"SkCustomTypeface.cpp",
"SkCycles.h",
"SkDashPath.cpp",
"SkDashPathPriv.h",
"SkEventTracer.cpp",
"SkFloatToDecimal.cpp",
"SkFloatToDecimal.h",
"SkFloatUtils.h",
"SkGaussianColorFilter.cpp",
"SkMatrix22.cpp",
"SkMatrix22.h",
"SkMultiPictureDocument.cpp",
"SkMultiPictureDocumentPriv.h",
"SkNWayCanvas.cpp",
"SkNullCanvas.cpp",
"SkOrderedFontMgr.cpp",
"SkPaintFilterCanvas.cpp",
"SkParseColor.cpp",
"SkParsePath.cpp",
"SkPatchUtils.cpp",
"SkPatchUtils.h",
"SkPolyUtils.cpp",
"SkPolyUtils.h",
"SkShadowTessellator.cpp",
"SkShadowTessellator.h",
"SkShadowUtils.cpp",
"SkTestCanvas.h",
"SkTextUtils.cpp",
]
split_srcs_and_hdrs(
name = "core",
files = CORE_FILES,
)
skia_filegroup(
name = "json_hdrs",
srcs = [
"SkJSON.h",
"SkJSONWriter.h",
],
visibility = [
"//modules/skottie:__pkg__",
"//tools/debugger:__pkg__",
],
)
skia_filegroup(
name = "json_srcs",
srcs = [
"SkJSON.cpp",
"SkJSONWriter.cpp",
],
visibility = [
"//modules/skottie:__pkg__",
"//tools/debugger:__pkg__",
],
)
selects.config_setting_group(
name = "needs_json",
match_any = [
"//src/sksl:enable_sksl_tracing_true",
],
)
# In separate group to avoid exporting to a *.gni file.
SKSL_FILES = [
"SkShaderUtils.cpp",
"SkShaderUtils.h",
]
split_srcs_and_hdrs(
name = "sksl",
files = SKSL_FILES,
)
skia_filegroup(
name = "chromium_hdrs",
# We allow chromium to use this as a diagnostic tool, but it is not
# part of Skia's public API. It is in its own filegroup to create
# a gni entry containing it.
srcs = [
"SkMultiPictureDocument.h",
],
)
skia_filegroup(
name = "srcs",
srcs = [
":core_srcs",
":core_skslc_srcs",
] + select({
"//src/sksl:needs_sksl": [":sksl_srcs"],
"//conditions:default": [],
}) + select({
":needs_json": [":json_srcs"],
"//conditions:default": [],
}),
visibility = ["//src:__pkg__"],
)
skia_filegroup(
name = "private_hdrs",
srcs = [
":chromium_hdrs",
":core_hdrs",
":core_skslc_hdrs",
] + select({
"//src/sksl:needs_sksl": [":sksl_hdrs"],
"//conditions:default": [],
}) + select({
":needs_json": [":json_hdrs"],
"//conditions:default": [],
}),
visibility = ["//src:__pkg__"],
)