xref: /aosp_15_r20/external/skia/src/gpu/ganesh/mock/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
9MOCK_FILES = [
10    "GrMockAttachment.h",
11    "GrMockBuffer.h",
12    "GrMockCaps.cpp",
13    "GrMockCaps.h",
14    "GrMockGpu.cpp",
15    "GrMockGpu.h",
16    "GrMockOpTarget.h",
17    "GrMockOpsRenderPass.h",
18    "GrMockRenderTask.h",
19    "GrMockSurfaceProxy.h",
20    "GrMockTexture.h",
21    "GrMockTypes.cpp",
22    "GrMockTypesPriv.h",
23]
24
25split_srcs_and_hdrs(
26    name = "mock",
27    files = MOCK_FILES,
28    visibility = ["//src/gpu/ganesh:__pkg__"],
29)
30
31# TODO(kjlubick, egdaniel) If we decouple the mock Ganesh backend
32# then the headers/sources should be put here.
33skia_cc_library(
34    name = "ganesh_mock",
35    hdrs = [
36        "//include/gpu:shared_gpu_hdrs",
37        "//include/gpu/ganesh/mock:public_hdrs",
38    ],
39    visibility = ["//:__pkg__"],
40    deps = [
41        "//src/gpu/ganesh",
42    ],
43)
44
45generate_cpp_files_for_headers(
46    name = "headers_to_compile",
47    headers = [
48        "GrMockAttachment.h",
49        "GrMockBuffer.h",
50        "GrMockOpsRenderPass.h",
51        "GrMockOpTarget.h",
52        "GrMockRenderTask.h",
53        "GrMockSurfaceProxy.h",
54        "GrMockTexture.h",
55        "GrMockTypesPriv.h",
56    ],
57)
58