• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bazel:skia_rules.bzl", "exports_files_legacy", "generate_cpp_files_for_headers", "select_multi", "skia_filegroup")
2
3package(
4    default_applicable_licenses = ["//:license"],
5)
6
7licenses(["notice"])
8
9exports_files_legacy()
10
11# In separate group for mapping to //gn/gpu.gni:skia_shared_gpu_sources.
12skia_filegroup(
13    name = "shared_public_hdrs",
14    srcs = [
15        "GpuTypes.h",
16        "MutableTextureState.h",
17        "ShaderErrorHandler.h",
18    ],
19)
20
21skia_filegroup(
22    name = "public_hdrs",
23    srcs = [
24        "GrBackendSemaphore.h",
25        "GrBackendSurface.h",
26        "GrContextOptions.h",
27        "GrContextThreadSafeProxy.h",
28        "GrDirectContext.h",
29        "GrDriverBugWorkarounds.h",
30        "GrDriverBugWorkaroundsAutogen.h",
31        "GrRecordingContext.h",
32        "GrTypes.h",
33        "GrYUVABackendTextures.h",
34        "//include/gpu/mock:public_hdrs",
35        # TODO(egdaniel, kjlubick) GrGLTypes.h is used unconditionally by GrBackendSemaphore.h
36        "//include/gpu/gl:public_hdrs",
37        ":shared_public_hdrs",
38        "//include/gpu/ganesh:public_hdrs",
39    ] + select_multi(
40        {
41            "//src/gpu:vulkan_ganesh": ["//include/gpu/vk:public_hdrs"],
42            "//src/gpu:metal_ganesh": ["//include/gpu/mtl:public_hdrs"],
43            # TODO(kjlubick) d3d backend
44        },
45    ),
46    visibility = ["//include:__pkg__"],
47)
48
49skia_filegroup(
50    name = "ganesh_hdrs",
51    srcs = [
52        "GrBackendSemaphore.h",
53        "GrBackendSurface.h",
54        "GrContextOptions.h",
55        "GrContextThreadSafeProxy.h",
56        "GrDirectContext.h",
57        "GrDriverBugWorkarounds.h",
58        "GrDriverBugWorkaroundsAutogen.h",
59        "GrRecordingContext.h",
60        "GrTypes.h",
61        "GrYUVABackendTextures.h",
62        ":shared_public_hdrs",
63    ],
64    visibility = ["//src/gpu/ganesh:__subpackages__"],
65)
66
67skia_filegroup(
68    name = "shared_gpu_hdrs",
69    srcs = [
70        "GpuTypes.h",
71        "GrTypes.h",  # TODO(kjlubick, egdaniel) Tesselation.h uses GR_MAKE_BITFIELD_CLASS_OPS
72        "MutableTextureState.h",
73        "ShaderErrorHandler.h",
74    ],
75    visibility = ["//src/gpu:__pkg__"],
76)
77
78generate_cpp_files_for_headers(
79    name = "headers_to_compile",
80    headers = [
81        "GrTypes.h",
82        "MutableTextureState.h",
83    ],
84)
85