• 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_graphite.cpp",
29    "ClipStack_graphite.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    "TextureInfo.cpp",
135    "TextureInfoPriv.h",
136    "TextureProxy.cpp",
137    "TextureProxy.h",
138    "TextureProxyView.h",
139    "TextureUtils.cpp",
140    "TextureUtils.h",
141    "PrecompileContext.cpp",
142    "PrecompileContextPriv.h",
143    "Uniform.h",
144    "UniformManager.cpp",
145    "UniformManager.h",
146    "UniquePaintParamsID.h",
147    "UploadBufferManager.cpp",
148    "UploadBufferManager.h",
149    "YUVABackendTextures.cpp",
150]
151
152split_srcs_and_hdrs(
153    name = "_graphite",
154    files = GRAPHITE_FILES,
155)
156
157PRECOMPILE_FILES = [
158    "FactoryFunctions.cpp",
159    "FactoryFunctions.h",
160    "PrecompileInternal.h",
161    "PublicPrecompile.cpp",
162    "AndroidSpecificPrecompile.h",
163]
164
165split_srcs_and_hdrs(
166    name = "precompile",
167    files = PRECOMPILE_FILES,
168)
169
170skia_cc_library(
171    name = "graphite",
172    srcs = [
173        ":_graphite_srcs",
174        "//src/gpu/graphite/compute:compute_srcs",
175        "//src/gpu/graphite/geom:geom_srcs",
176        "//src/gpu/graphite/render:render_srcs",
177        "//src/gpu/graphite/task:task_srcs",
178        "//src/gpu/graphite/text:text_srcs",
179        "//src/sksl:sksl_graphite_modules_hdrs",
180        "//src/sksl:sksl_graphite_modules_srcs",
181        "//src/text/gpu:gpu_hdrs",
182        "//src/text/gpu:gpu_srcs",
183    ],
184    hdrs = [
185        ":_graphite_hdrs",
186        "//include/gpu:shared_gpu_hdrs",
187        "//include/gpu/graphite:public_hdrs",
188        "//src/gpu/graphite/compute:compute_hdrs",
189        "//src/gpu/graphite/geom:geom_hdrs",
190        "//src/gpu/graphite/render:render_hdrs",
191        "//src/gpu/graphite/task:task_hdrs",
192        "//src/gpu/graphite/text:text_hdrs",
193    ],
194    defines = [
195        "SK_GRAPHITE",
196    ],
197    visibility = [
198        "//src/gpu/graphite/mtl:__pkg__",
199        "//src/gpu/graphite/vk:__pkg__",
200    ],
201    deps = [
202        "//:core",
203        "//src/base",
204        "//src/core:core_priv",
205        "//src/gpu",
206        "//src/sksl/codegen:gpu",
207    ],
208)
209
210skia_cc_library(
211    name = "graphite_TEST_UTIL",
212    testonly = True,
213    srcs = [
214        ":_graphite_srcs",
215        "//src/gpu/graphite/compute:compute_srcs",
216        "//src/gpu/graphite/geom:geom_srcs",
217        "//src/gpu/graphite/render:render_srcs",
218        "//src/gpu/graphite/task:task_srcs",
219        "//src/gpu/graphite/text:text_srcs",
220        "//src/sksl:sksl_graphite_modules_hdrs",
221        "//src/sksl:sksl_graphite_modules_srcs",
222        "//src/text/gpu:gpu_hdrs",
223        "//src/text/gpu:gpu_srcs",
224    ],
225    hdrs = [
226        ":_graphite_hdrs",
227        "//include/gpu:shared_gpu_hdrs",
228        "//include/gpu/graphite:public_hdrs",
229        "//src/gpu/graphite/compute:compute_hdrs",
230        "//src/gpu/graphite/geom:geom_hdrs",
231        "//src/gpu/graphite/render:render_hdrs",
232        "//src/gpu/graphite/task:task_hdrs",
233        "//src/gpu/graphite/text:text_hdrs",
234    ],
235    defines = [
236        "SK_GRAPHITE",
237        "GPU_TEST_UTILS",
238    ],
239    visibility = [
240        "//src/gpu/graphite/mtl:__pkg__",
241        "//src/gpu/graphite/vk:__pkg__",
242        "//tools:__subpackages__",
243    ],
244    deps = [
245        "//:core",
246        "//src/base",
247        "//src/core:core_priv",
248        "//src/gpu",
249        "//src/sksl/codegen:gpu",
250    ],
251)
252