• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bazel:skia_rules.bzl", "skia_cc_library", "split_srcs_and_hdrs")
2
3package(
4    default_applicable_licenses = ["//:license"],
5)
6
7licenses(["notice"])
8
9GRAPHITE_FILES = [
10    "AtlasProvider.cpp",
11    "AtlasProvider.h",
12    "Attribute.h",
13    "BackendSemaphore.cpp",
14    "BackendSemaphorePriv.h",
15    "BackendTexture.cpp",
16    "BackendTexturePriv.h",
17    "Buffer.cpp",
18    "Buffer.h",
19    "BufferManager.cpp",
20    "BufferManager.h",
21    "BuiltInCodeSnippetID.h",
22    "Caps.cpp",
23    "Caps.h",
24    "ClientMappedBufferManager.cpp",
25    "ClientMappedBufferManager.h",
26    "ClipAtlasManager.cpp",
27    "ClipAtlasManager.h",
28    "ClipStack.cpp",
29    "ClipStack.h",
30    "CommandBuffer.cpp",
31    "CommandBuffer.h",
32    "CommandTypes.h",
33    "ComputePathAtlas.cpp",
34    "ComputePathAtlas.h",
35    "ComputePipeline.cpp",
36    "ComputePipeline.h",
37    "ComputePipelineDesc.h",
38    "ComputeTypes.h",
39    "Context.cpp",
40    "ContextOptionsPriv.h",
41    "ContextPriv.h",
42    "ContextUtils.cpp",
43    "ContextUtils.h",
44    "DescriptorData.h",
45    "Device.cpp",
46    "Device.h",
47    "DrawAtlas.cpp",
48    "DrawAtlas.h",
49    "DrawCommands.h",
50    "DrawContext.cpp",
51    "DrawContext.h",
52    "DrawList.cpp",
53    "DrawList.h",
54    "DrawOrder.h",
55    "DrawParams.h",
56    "DrawPass.cpp",
57    "DrawPass.h",
58    "DrawTypes.h",
59    "DrawWriter.cpp",
60    "DrawWriter.h",
61    "GlobalCache.cpp",
62    "GlobalCache.h",
63    "GpuWorkSubmission.cpp",
64    "GpuWorkSubmission.h",
65    "GraphicsPipeline.cpp",
66    "GraphicsPipeline.h",
67    "GraphicsPipelineDesc.h",
68    "GraphiteResourceKey.cpp",
69    "GraphiteResourceKey.h",
70    "ImageFactories.cpp",
71    "Image_Base_Graphite.cpp",
72    "Image_Base_Graphite.h",
73    "Image_Graphite.cpp",
74    "Image_Graphite.h",
75    "Image_YUVA_Graphite.cpp",
76    "Image_YUVA_Graphite.h",
77    "InternalDrawTypeFlags.h",
78    "KeyContext.cpp",
79    "KeyContext.h",
80    "KeyHelpers.cpp",
81    "KeyHelpers.h",
82    "Log.h",
83    "PaintParams.cpp",
84    "PaintParams.h",
85    "PaintParamsKey.cpp",
86    "PaintParamsKey.h",
87    "PathAtlas.cpp",
88    "PathAtlas.h",
89    "PipelineData.h",
90    "ProxyCache.cpp",
91    "ProxyCache.h",
92    "QueueManager.cpp",
93    "QueueManager.h",
94    "RasterPathAtlas.cpp",
95    "RasterPathAtlas.h",
96    "RasterPathUtils.cpp",
97    "RasterPathUtils.h",
98    "ReadSwizzle.h",
99    "Recorder.cpp",
100    "RecorderPriv.h",
101    "Recording.cpp",
102    "RecordingPriv.h",
103    "RenderPassDesc.cpp",
104    "RenderPassDesc.h",
105    "Renderer.cpp",
106    "Renderer.h",
107    "RendererProvider.cpp",
108    "RendererProvider.h",
109    "Resource.cpp",
110    "Resource.h",
111    "ResourceCache.cpp",
112    "ResourceCache.h",
113    "ResourceProvider.cpp",
114    "ResourceProvider.h",
115    "ResourceTypes.h",
116    "RuntimeEffectDictionary.cpp",
117    "RuntimeEffectDictionary.h",
118    "Sampler.cpp",
119    "Sampler.h",
120    "ScratchResourceManager.cpp",
121    "ScratchResourceManager.h",
122    "ShaderCodeDictionary.cpp",
123    "ShaderCodeDictionary.h",
124    "ShaderInfo.cpp",
125    "ShaderInfo.h",
126    "SharedContext.cpp",
127    "SharedContext.h",
128    "SpecialImage_Graphite.cpp",
129    "SpecialImage_Graphite.h",
130    "Surface_Graphite.cpp",
131    "Surface_Graphite.h",
132    "Texture.cpp",
133    "Texture.h",
134    "TextureFormat.cpp",
135    "TextureFormat.h",
136    "TextureInfo.cpp",
137    "TextureInfoPriv.h",
138    "TextureProxy.cpp",
139    "TextureProxy.h",
140    "TextureProxyView.h",
141    "TextureUtils.cpp",
142    "TextureUtils.h",
143    "PrecompileContext.cpp",
144    "PrecompileContextPriv.h",
145    "Uniform.h",
146    "UniformManager.cpp",
147    "UniformManager.h",
148    "UniquePaintParamsID.h",
149    "UploadBufferManager.cpp",
150    "UploadBufferManager.h",
151    "YUVABackendTextures.cpp",
152]
153
154split_srcs_and_hdrs(
155    name = "_graphite",
156    files = GRAPHITE_FILES,
157)
158
159PRECOMPILE_FILES = [
160    "FactoryFunctions.cpp",
161    "FactoryFunctions.h",
162    "PrecompileInternal.h",
163    "PublicPrecompile.cpp",
164    "SerializationUtils.cpp",
165    "SerializationUtils.h",
166]
167
168split_srcs_and_hdrs(
169    name = "precompile",
170    files = PRECOMPILE_FILES,
171)
172
173skia_cc_library(
174    name = "graphite",
175    srcs = [
176        ":_graphite_srcs",
177        "//src/gpu/graphite/compute:compute_srcs",
178        "//src/gpu/graphite/geom:geom_srcs",
179        "//src/gpu/graphite/render:render_srcs",
180        "//src/gpu/graphite/task:task_srcs",
181        "//src/gpu/graphite/text:text_srcs",
182        "//src/sksl:sksl_graphite_modules_hdrs",
183        "//src/sksl:sksl_graphite_modules_srcs",
184        "//src/text/gpu:gpu_hdrs",
185        "//src/text/gpu:gpu_srcs",
186    ],
187    hdrs = [
188        ":_graphite_hdrs",
189        "//include/gpu:shared_gpu_hdrs",
190        "//include/gpu/graphite:public_hdrs",
191        "//src/gpu/graphite/compute:compute_hdrs",
192        "//src/gpu/graphite/geom:geom_hdrs",
193        "//src/gpu/graphite/render:render_hdrs",
194        "//src/gpu/graphite/task:task_hdrs",
195        "//src/gpu/graphite/text:text_hdrs",
196    ],
197    defines = [
198        "SK_GRAPHITE",
199    ],
200    visibility = [
201        "//src/gpu/graphite/mtl:__pkg__",
202        "//src/gpu/graphite/vk:__pkg__",
203    ],
204    deps = [
205        "//:core",
206        "//src/base",
207        "//src/core:core_priv",
208        "//src/gpu",
209        "//src/sksl/codegen:gpu",
210    ],
211)
212
213skia_cc_library(
214    name = "graphite_TEST_UTIL",
215    testonly = True,
216    srcs = [
217        ":_graphite_srcs",
218        "//src/gpu/graphite/compute:compute_srcs",
219        "//src/gpu/graphite/geom:geom_srcs",
220        "//src/gpu/graphite/render:render_srcs",
221        "//src/gpu/graphite/task:task_srcs",
222        "//src/gpu/graphite/text:text_srcs",
223        "//src/sksl:sksl_graphite_modules_hdrs",
224        "//src/sksl:sksl_graphite_modules_srcs",
225        "//src/text/gpu:gpu_hdrs",
226        "//src/text/gpu:gpu_srcs",
227    ],
228    hdrs = [
229        ":_graphite_hdrs",
230        "//include/gpu:shared_gpu_hdrs",
231        "//include/gpu/graphite:public_hdrs",
232        "//src/gpu/graphite/compute:compute_hdrs",
233        "//src/gpu/graphite/geom:geom_hdrs",
234        "//src/gpu/graphite/render:render_hdrs",
235        "//src/gpu/graphite/task:task_hdrs",
236        "//src/gpu/graphite/text:text_hdrs",
237    ],
238    defines = [
239        "SK_GRAPHITE",
240        "GPU_TEST_UTILS",
241    ],
242    visibility = [
243        "//dm:__pkg__",
244        "//src/gpu/graphite/mtl:__pkg__",
245        "//src/gpu/graphite/vk:__pkg__",
246        "//tools:__subpackages__",
247    ],
248    deps = [
249        "//:core",
250        "//src/base",
251        "//src/core:core_priv",
252        "//src/gpu",
253        "//src/sksl/codegen:gpu",
254    ],
255)
256