• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bazel:skia_rules.bzl", "exports_files_legacy", "generate_cpp_files_for_headers", "skia_filegroup")
2
3package(
4    default_applicable_licenses = ["//:license"],
5)
6
7licenses(["notice"])
8
9exports_files_legacy()
10
11# In own skia_filegroup for mapping to //gn/gpu.gni:skia_shared_gpu_sources.
12SHARED_GPU_HEADERS = ["SingleOwner.h"]
13
14skia_filegroup(
15    name = "shared_gpu_private_hdrs",
16    srcs = SHARED_GPU_HEADERS,
17)
18
19# Headers with no corresponding .cpp files
20IWYU_HDRS = [
21    "SkAPI.h",
22    "SkASAN.h",
23    "SkAlign.h",
24    "SkAlignedStorage.h",
25    "SkAnySubclass.h",
26    "SkAssert.h",
27    "SkAttributes.h",
28    "SkCPUTypes.h",
29    "SkDebug.h",
30    "SkFeatures.h",
31    "SkFixed.h",
32    "SkLoadUserConfig.h",
33    "SkMacros.h",
34    "SkMath.h",
35    "SkMutex.h",
36    "SkNoncopyable.h",
37    "SkOnce.h",
38    "SkPoint_impl.h",
39    "SkSafe32.h",
40    "SkSpan_impl.h",
41    "SkTArray.h",
42    "SkTFitsIn.h",
43    "SkTLogic.h",
44    "SkTPin.h",
45    "SkTemplates.h",
46    "SkThreadAnnotations.h",
47    "SkTo.h",
48    "SkTypeTraits.h",
49]
50
51skia_filegroup(
52    name = "private_hdrs",
53    srcs = IWYU_HDRS + [
54        "SkContainers.h",
55        "SkDeque.h",
56        "SkFloatingPoint.h",
57        "SkMalloc.h",
58        "SkSemaphore.h",
59        "SkTDArray.h",
60        "SkThreadID.h",
61        ":shared_gpu_private_hdrs",
62    ],
63    visibility = [
64        "//include/private:__pkg__",
65        "//src/base:__pkg__",
66        "//src/opts:__pkg__",
67    ],
68)
69
70generate_cpp_files_for_headers(
71    name = "headers_to_compile",
72    headers = IWYU_HDRS + SHARED_GPU_HEADERS,
73)
74