• 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 the //gn/sksl.gni file.
12skia_filegroup(
13    name = "sksl_private_hdrs",
14    srcs = [
15        "SkSLSampleUsage.h",
16    ],
17)
18
19skia_filegroup(
20    name = "private_hdrs",
21    srcs = [
22        "SkColorData.h",
23        "SkEncodedInfo.h",
24        "SkExif.h",
25        "SkGainmapInfo.h",
26        "SkGainmapShader.h",
27        "SkIDChangeListener.h",
28        "SkJpegMetadataDecoder.h",
29        "SkPathRef.h",
30        "SkWeakRefCnt.h",
31        "SkXmp.h",
32        ":sksl_private_hdrs",
33        "//include/private/base:private_hdrs",
34        "//include/private/chromium:private_hdrs",
35    ] + select({
36        "//src/gpu:has_ganesh_backend": [
37            "//include/private/gpu:private_hdrs",
38        ],
39        "//conditions:default": [],
40    }),
41    visibility = ["//include:__pkg__"],
42)
43
44skia_filegroup(
45    name = "core_priv_hdrs",
46    srcs = [
47        # Files listed here will be available to Skia internals via the core_priv target.
48        "SkColorData.h",
49        "SkIDChangeListener.h",
50        "SkSLSampleUsage.h",
51        "SkGainmapShader.h",
52        "SkGainmapInfo.h",
53    ],
54    visibility = ["//src/core:__pkg__"],
55)
56
57skia_filegroup(
58    name = "core_srcs",
59    srcs = [
60        # We really don't want this header to be used outside of SkPath and SkPathBuilder
61        # so we add it to core under srcs instead to enforce that.
62        "SkPathRef.h",
63        "SkWeakRefCnt.h",
64    ],
65    visibility = ["//src/core:__pkg__"],
66)
67
68skia_filegroup(
69    name = "decode_srcs",
70    srcs = [
71        "SkEncodedInfo.h",
72        "SkExif.h",
73    ],
74    visibility = ["//src/codec:__pkg__"],
75)
76
77skia_filegroup(
78    name = "jpeg_decode_srcs",
79    srcs = [
80        "SkJpegMetadataDecoder.h",
81    ],
82    visibility = ["//src/codec:__pkg__"],
83)
84
85skia_filegroup(
86    name = "opts_srcs",
87    srcs = [
88        "SkColorData.h",
89    ],
90    visibility = ["//src/opts:__pkg__"],
91)
92
93generate_cpp_files_for_headers(
94    name = "headers_to_compile",
95    headers = [
96        "SkIDChangeListener.h",
97        "SkWeakRefCnt.h",
98    ],
99)
100