• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bazel:skia_rules.bzl", "exports_files_legacy", "select_multi", "skia_cc_library")
2
3package(
4    default_applicable_licenses = ["//:license"],
5)
6
7licenses(["notice"])
8
9exports_files_legacy()
10
11skia_cc_library(
12    name = "legacy_window",
13    testonly = True,
14    srcs = [
15        "RasterWindowContext.h",
16        "WindowContext.cpp",
17    ] + select_multi({
18        "//src/gpu:gl_ganesh": [
19            "GLWindowContext.cpp",
20            "GLWindowContext.h",
21        ],
22        "//src/gpu:vulkan_ganesh": [
23            "VulkanWindowContext.h",
24            "VulkanWindowContext.cpp",
25        ],
26    }) + select({
27        "@platforms//os:android": ["//tools/window/android:srcs"],
28        "//conditions:default": [],
29    }) + select({
30        "@platforms//os:linux": ["//tools/window/unix:srcs"],
31        "//conditions:default": [],
32        # TODO(kjlubick) add Windows/Mac support
33    }),
34    hdrs = [
35        "DisplayParams.h",
36        "WindowContext.h",
37    ],
38    visibility = ["//:__subpackages__"],
39    deps = [
40        "//:skia_internal",
41    ] + select({
42        "//src/gpu:vulkan_ganesh": ["//tools/gpu/vk:testutils"],
43        "//conditions:default": [],
44    }) + select({
45        "@platforms//os:android": ["//tools/window/android:deps"],
46        "//conditions:default": [],
47    }),
48)
49
50skia_cc_library(
51    name = "window",
52    testonly = True,
53    srcs = [
54        "RasterWindowContext.h",
55        "WindowContext.cpp",
56        "GLWindowContext.cpp",
57        # TODO(kjlubick): Add Vulkan support.
58        # "VulkanWindowContext.cpp",
59    ] + select({
60        "@platforms//os:android": ["//tools/window/android:srcs"],
61        "//conditions:default": [],
62    }) + select({
63        "@platforms//os:linux": ["//tools/window/unix:srcs"],
64        "//conditions:default": [],
65        # TODO(kjlubick) add Windows/Mac support
66    }),
67    hdrs = [
68        "DisplayParams.h",
69        "WindowContext.h",
70        "GLWindowContext.h",
71        # TODO(kjlubick): Add Vulkan support.
72        # "VulkanWindowContext.h",
73    ],
74    visibility = ["//:__subpackages__"],
75    deps = [
76        "//:core",
77        "//:ganesh_gl",
78        "//:ganesh_glx_factory",
79        "//tools/fonts:font_tool_utils",
80    ] + select({
81        # TODO(kjlubick): Add Android support.
82        # "@platforms//os:android": ["//tools/window/android:deps"],
83        "//conditions:default": [],
84    }),
85)
86