xref: /aosp_15_r20/external/skia/src/gpu/BUILD.bazel (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1load("//bazel:skia_rules.bzl", "generate_cpp_files_for_headers", "skia_cc_library", "split_srcs_and_hdrs")
2
3package(
4    default_applicable_licenses = ["//:license"],
5)
6
7licenses(["notice"])
8
9SHARED_FILES = [
10    "AsyncReadTypes.h",
11    "AtlasTypes.cpp",
12    "AtlasTypes.h",
13    "Blend.cpp",
14    "Blend.h",
15    "BlendFormula.cpp",
16    "BlendFormula.h",
17    "BlurUtils.cpp",
18    "BlurUtils.h",
19    "BufferWriter.h",
20    "DataUtils.cpp",
21    "DataUtils.h",
22    "DitherUtils.cpp",
23    "DitherUtils.h",
24    "GpuRefCnt.h",
25    "GpuTypesPriv.h",
26    "KeyBuilder.h",
27    "MutableTextureState.cpp",
28    "MutableTextureStatePriv.h",
29    "Rectanizer.h",
30    "RectanizerPow2.cpp",
31    "RectanizerPow2.h",
32    "RectanizerSkyline.cpp",
33    "RectanizerSkyline.h",
34    "RefCntedCallback.h",
35    "ResourceKey.cpp",
36    "ResourceKey.h",
37    "ShaderErrorHandler.cpp",
38    "SkBackingFit.cpp",
39    "SkBackingFit.h",
40    "SkRenderEngineAbortf.h",
41    "SkSLToBackend.cpp",
42    "SkSLToBackend.h",
43    "Swizzle.cpp",
44    "Swizzle.h",
45    "SwizzlePriv.h",
46    "TiledTextureUtils.cpp",
47    "TiledTextureUtils.h",
48]
49
50split_srcs_and_hdrs(
51    name = "shared",
52    files = SHARED_FILES,
53)
54
55skia_cc_library(
56    name = "gpu",
57    srcs = [
58        ":shared_srcs",
59        "//src/gpu/tessellate:tessellate_srcs",
60        "//src/utils:shader_utils_srcs",
61    ],
62    hdrs = [
63        ":shared_hdrs",
64        "//include/gpu:shared_gpu_hdrs",
65        "//src/gpu/tessellate:tessellate_hdrs",
66        "//src/utils:shader_utils_hdrs",
67    ],
68    visibility = [
69        "//src/gpu:__subpackages__",
70        "//src/sksl/codegen:__pkg__",
71    ],
72    deps = [
73        "//:core",
74        "//src/base",
75        "//src/core:core_priv",
76    ],
77)
78
79generate_cpp_files_for_headers(
80    name = "headers_to_compile",
81    headers = [
82        "AsyncReadTypes.h",
83        "BufferWriter.h",
84        "GpuRefCnt.h",
85        "GpuTypesPriv.h",
86        "KeyBuilder.h",
87        "MutableTextureStatePriv.h",
88        "SkRenderEngineAbortf.h",
89        "SwizzlePriv.h",
90    ],
91)
92