| 1 |
load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_filegroup", "split_srcs_and_hdrs") |
| 2 |
|
| 3 |
package( |
| 4 |
default_applicable_licenses = ["//:license"], |
| 5 |
) |
| 6 |
|
| 7 |
licenses(["notice"]) |
| 8 |
|
| 9 |
# In separate groups for exporting to sksl.gni:skslc_deps. |
| 10 |
SKSLC_FILES = [ |
| 11 |
"GrMemoryPool.cpp", |
| 12 |
"GrMemoryPool.h", |
| 13 |
] |
| 14 |
|
| 15 |
split_srcs_and_hdrs( |
| 16 |
name = "core_skslc", |
| 17 |
files = SKSLC_FILES, |
| 18 |
) |
| 19 |
|
| 20 |
CORE_FILES = [ |
| 21 |
"ClipStack.cpp", |
| 22 |
"ClipStack.h", |
| 23 |
"Device.cpp", |
| 24 |
"Device_drawTexture.cpp", |
| 25 |
"Device.h", |
| 26 |
"GrAppliedClip.h", |
| 27 |
"GrAttachment.cpp", |
| 28 |
"GrAttachment.h", |
| 29 |
"GrAuditTrail.cpp", |
| 30 |
"GrAuditTrail.h", |
| 31 |
"GrAutoLocaleSetter.h", |
| 32 |
"GrBackendSemaphore.cpp", |
| 33 |
"GrBackendSemaphorePriv.h", |
| 34 |
"GrBackendSurface.cpp", |
| 35 |
"GrBackendSurfacePriv.h", |
| 36 |
"GrBackendTextureImageGenerator.cpp", |
| 37 |
"GrBackendTextureImageGenerator.h", |
| 38 |
"GrBackendUtils.cpp", |
| 39 |
"GrBackendUtils.h", |
| 40 |
"GrBaseContextPriv.h", |
| 41 |
"GrBlurUtils.cpp", |
| 42 |
"GrBlurUtils.h", |
| 43 |
"GrBuffer.h", |
| 44 |
"GrBufferAllocPool.cpp", |
| 45 |
"GrBufferAllocPool.h", |
| 46 |
"GrBufferTransferRenderTask.cpp", |
| 47 |
"GrBufferTransferRenderTask.h", |
| 48 |
"GrBufferUpdateRenderTask.cpp", |
| 49 |
"GrBufferUpdateRenderTask.h", |
| 50 |
"GrCaps.cpp", |
| 51 |
"GrCaps.h", |
| 52 |
"GrCanvas.cpp", |
| 53 |
"GrCanvas.h", |
| 54 |
"GrClientMappedBufferManager.cpp", |
| 55 |
"GrClientMappedBufferManager.h", |
| 56 |
"GrClip.h", |
| 57 |
"GrColor.h", |
| 58 |
"GrColorInfo.cpp", |
| 59 |
"GrColorInfo.h", |
| 60 |
"GrColorSpaceXform.cpp", |
| 61 |
"GrColorSpaceXform.h", |
| 62 |
"GrContextThreadSafeProxy.cpp", |
| 63 |
"GrContextThreadSafeProxyPriv.h", |
| 64 |
"GrContext_Base.cpp", |
| 65 |
"GrCopyRenderTask.cpp", |
| 66 |
"GrCopyRenderTask.h", |
| 67 |
"GrCpuBuffer.h", |
| 68 |
"GrDDLContext.cpp", |
| 69 |
"GrDDLTask.cpp", |
| 70 |
"GrDDLTask.h", |
| 71 |
"GrDataUtils.cpp", |
| 72 |
"GrDataUtils.h", |
| 73 |
"GrDefaultGeoProcFactory.cpp", |
| 74 |
"GrDefaultGeoProcFactory.h", |
| 75 |
"GrDeferredProxyUploader.h", |
| 76 |
"GrDeferredUpload.h", |
| 77 |
"GrDeferredDisplayList.cpp", |
| 78 |
"GrDeferredDisplayListPriv.h", |
| 79 |
"GrDeferredDisplayListRecorder.cpp", |
| 80 |
"GrDirectContext.cpp", |
| 81 |
"GrDirectContextPriv.cpp", |
| 82 |
"GrDirectContextPriv.h", |
| 83 |
"GrDistanceFieldGenFromVector.cpp", |
| 84 |
"GrDistanceFieldGenFromVector.h", |
| 85 |
"GrDrawIndirectCommand.h", |
| 86 |
"GrDrawOpAtlas.cpp", |
| 87 |
"GrDrawOpAtlas.h", |
| 88 |
"GrDrawOpTest.cpp", |
| 89 |
"GrDrawOpTest.h", |
| 90 |
"GrDrawingManager.cpp", |
| 91 |
"GrDrawingManager.h", |
| 92 |
"GrDriverBugWorkarounds.cpp", |
| 93 |
"GrDstProxyView.h", |
| 94 |
"GrDynamicAtlas.cpp", |
| 95 |
"GrDynamicAtlas.h", |
| 96 |
"GrEagerVertexAllocator.cpp", |
| 97 |
"GrEagerVertexAllocator.h", |
| 98 |
"GrFPArgs.h", |
| 99 |
"GrFixedClip.cpp", |
| 100 |
"GrFixedClip.h", |
| 101 |
"GrFragmentProcessor.cpp", |
| 102 |
"GrFragmentProcessor.h", |
| 103 |
"GrFragmentProcessors.cpp", |
| 104 |
"GrFragmentProcessors.h", |
| 105 |
"GrGeometryProcessor.cpp", |
| 106 |
"GrGeometryProcessor.h", |
| 107 |
"GrGpu.cpp", |
| 108 |
"GrGpu.h", |
| 109 |
"GrGpuBuffer.cpp", |
| 110 |
"GrGpuBuffer.h", |
| 111 |
"GrGpuResource.cpp", |
| 112 |
"GrGpuResource.h", |
| 113 |
"GrGpuResourceCacheAccess.h", |
| 114 |
"GrGpuResourcePriv.h", |
| 115 |
"GrHashMapWithCache.h", |
| 116 |
"GrImageContext.cpp", |
| 117 |
"GrImageContextPriv.h", |
| 118 |
"GrImageInfo.cpp", |
| 119 |
"GrImageInfo.h", |
| 120 |
"GrManagedResource.cpp", |
| 121 |
"GrManagedResource.h", |
| 122 |
"GrMeshBuffers.cpp", |
| 123 |
"GrMeshBuffers.h", |
| 124 |
"GrMeshDrawTarget.cpp", |
| 125 |
"GrMeshDrawTarget.h", |
| 126 |
"GrNativeRect.h", |
| 127 |
"GrNonAtomicRef.h", |
| 128 |
"GrOnFlushResourceProvider.cpp", |
| 129 |
"GrOnFlushResourceProvider.h", |
| 130 |
"GrOpFlushState.cpp", |
| 131 |
"GrOpFlushState.h", |
| 132 |
"GrOpsRenderPass.cpp", |
| 133 |
"GrOpsRenderPass.h", |
| 134 |
"GrOpsTypes.h", |
| 135 |
"GrPaint.cpp", |
| 136 |
"GrPaint.h", |
| 137 |
"GrPersistentCacheUtils.cpp", |
| 138 |
"GrPersistentCacheUtils.h", |
| 139 |
"GrPipeline.cpp", |
| 140 |
"GrPipeline.h", |
| 141 |
"GrPixmap.h", |
| 142 |
"GrProcessor.cpp", |
| 143 |
"GrProcessor.h", |
| 144 |
"GrProcessorAnalysis.cpp", |
| 145 |
"GrProcessorAnalysis.h", |
| 146 |
"GrProcessorSet.cpp", |
| 147 |
"GrProcessorSet.h", |
| 148 |
"GrProcessorUnitTest.cpp", |
| 149 |
"GrProcessorUnitTest.h", |
| 150 |
"GrProgramDesc.cpp", |
| 151 |
"GrProgramDesc.h", |
| 152 |
"GrProgramInfo.cpp", |
| 153 |
"GrProgramInfo.h", |
| 154 |
"GrPromiseImageTexture.cpp", |
| 155 |
"GrProxyProvider.cpp", |
| 156 |
"GrProxyProvider.h", |
| 157 |
"GrRecordingContext.cpp", |
| 158 |
"GrRecordingContextPriv.cpp", |
| 159 |
"GrRecordingContextPriv.h", |
| 160 |
"GrRenderTarget.cpp", |
| 161 |
"GrRenderTarget.h", |
| 162 |
"GrRenderTargetProxy.cpp", |
| 163 |
"GrRenderTargetProxy.h", |
| 164 |
"GrRenderTask.cpp", |
| 165 |
"GrRenderTask.h", |
| 166 |
"GrRenderTaskCluster.cpp", |
| 167 |
"GrRenderTaskCluster.h", |
| 168 |
"GrResourceAllocator.cpp", |
| 169 |
"GrResourceAllocator.h", |
| 170 |
"GrResourceCache.cpp", |
| 171 |
"GrResourceCache.h", |
| 172 |
"GrResourceHandle.h", |
| 173 |
"GrResourceProvider.cpp", |
| 174 |
"GrResourceProvider.h", |
| 175 |
"GrResourceProviderPriv.h", |
| 176 |
"GrRingBuffer.cpp", |
| 177 |
"GrRingBuffer.h", |
| 178 |
"GrSPIRVUniformHandler.cpp", |
| 179 |
"GrSPIRVUniformHandler.h", |
| 180 |
"GrSPIRVVaryingHandler.cpp", |
| 181 |
"GrSPIRVVaryingHandler.h", |
| 182 |
"GrSWMaskHelper.cpp", |
| 183 |
"GrSWMaskHelper.h", |
| 184 |
"GrSamplerState.h", |
| 185 |
"GrScissorState.h", |
| 186 |
"GrSemaphore.h", |
| 187 |
"GrShaderCaps.cpp", |
| 188 |
"GrShaderCaps.h", |
| 189 |
"GrShaderVar.cpp", |
| 190 |
"GrShaderVar.h", |
| 191 |
"GrSimpleMesh.h", |
| 192 |
"GrStagingBufferManager.cpp", |
| 193 |
"GrStagingBufferManager.h", |
| 194 |
"GrStencilSettings.cpp", |
| 195 |
"GrStencilSettings.h", |
| 196 |
"GrStyle.cpp", |
| 197 |
"GrStyle.h", |
| 198 |
"GrSurface.cpp", |
| 199 |
"GrSurface.h", |
| 200 |
"GrSurfaceCharacterization.cpp", |
| 201 |
"GrSurfaceProxy.cpp", |
| 202 |
"GrSurfaceProxy.h", |
| 203 |
"GrSurfaceProxyPriv.h", |
| 204 |
"GrSurfaceProxyView.cpp", |
| 205 |
"GrSurfaceProxyView.h", |
| 206 |
"GrTestUtils.cpp", |
| 207 |
"GrTestUtils.h", |
| 208 |
"GrTTopoSort.h", |
| 209 |
"GrTexture.cpp", |
| 210 |
"GrTexture.h", |
| 211 |
"GrTextureProxy.cpp", |
| 212 |
"GrTextureProxy.h", |
| 213 |
"GrTextureProxyCacheAccess.h", |
| 214 |
"GrTextureProxyPriv.h", |
| 215 |
"GrTextureRenderTargetProxy.cpp", |
| 216 |
"GrTextureRenderTargetProxy.h", |
| 217 |
"GrTextureResolveManager.h", |
| 218 |
"GrTextureResolveRenderTask.cpp", |
| 219 |
"GrTextureResolveRenderTask.h", |
| 220 |
"GrThreadSafeCache.cpp", |
| 221 |
"GrThreadSafeCache.h", |
| 222 |
"GrThreadSafePipelineBuilder.cpp", |
| 223 |
"GrThreadSafePipelineBuilder.h", |
| 224 |
"GrTracing.h", |
| 225 |
"GrTransferFromRenderTask.cpp", |
| 226 |
"GrTransferFromRenderTask.h", |
| 227 |
"GrUniformDataManager.cpp", |
| 228 |
"GrUniformDataManager.h", |
| 229 |
"GrUserStencilSettings.h", |
| 230 |
"GrUtil.cpp", |
| 231 |
"GrUtil.h", |
| 232 |
"GrVertexChunkArray.cpp", |
| 233 |
"GrVertexChunkArray.h", |
| 234 |
"GrWaitRenderTask.cpp", |
| 235 |
"GrWaitRenderTask.h", |
| 236 |
"GrWindowRectangles.h", |
| 237 |
"GrWindowRectsState.h", |
| 238 |
"GrWritePixelsRenderTask.cpp", |
| 239 |
"GrWritePixelsRenderTask.h", |
| 240 |
"GrXferProcessor.cpp", |
| 241 |
"GrXferProcessor.h", |
| 242 |
"GrYUVABackendTextures.cpp", |
| 243 |
"GrYUVATextureProxies.cpp", |
| 244 |
"GrYUVATextureProxies.h", |
| 245 |
"PathRenderer.cpp", |
| 246 |
"PathRenderer.h", |
| 247 |
"PathRendererChain.cpp", |
| 248 |
"PathRendererChain.h", |
| 249 |
"SkGr.cpp", |
| 250 |
"SkGr.h", |
| 251 |
"SkGaneshRecorder.h", |
| 252 |
"StencilClip.h", |
| 253 |
"StencilMaskHelper.cpp", |
| 254 |
"StencilMaskHelper.h", |
| 255 |
"SurfaceContext.cpp", |
| 256 |
"SurfaceContext.h", |
| 257 |
"SurfaceDrawContext.cpp", |
| 258 |
"SurfaceDrawContext.h", |
| 259 |
"SurfaceFillContext.cpp", |
| 260 |
"SurfaceFillContext.h", |
| 261 |
"TestFormatColorTypeCombination.h", |
| 262 |
] |
| 263 |
|
| 264 |
split_srcs_and_hdrs( |
| 265 |
name = "core", |
| 266 |
files = CORE_FILES, |
| 267 |
) |
| 268 |
|
| 269 |
skia_filegroup( |
| 270 |
name = "android_srcs", |
| 271 |
srcs = [ |
| 272 |
"GrAHardwareBufferImageGenerator.cpp", |
| 273 |
"GrAHardwareBufferImageGenerator.h", |
| 274 |
"GrAHardwareBufferUtils.cpp", |
| 275 |
], |
| 276 |
) |
| 277 |
|
| 278 |
skia_cc_library( |
| 279 |
name = "ganesh", |
| 280 |
srcs = [ |
| 281 |
":core_skslc_srcs", |
| 282 |
":core_srcs", |
| 283 |
"//src/gpu/ganesh/effects:effects_srcs", |
| 284 |
"//src/gpu/ganesh/geometry:geometry_srcs", |
| 285 |
"//src/gpu/ganesh/glsl:glsl_srcs", |
| 286 |
"//src/gpu/ganesh/gradients:gradient_srcs", |
| 287 |
"//src/gpu/ganesh/image:image_srcs", |
| 288 |
"//src/gpu/ganesh/ops:ops_srcs", |
| 289 |
"//src/gpu/ganesh/surface:surface_srcs", |
| 290 |
"//src/gpu/ganesh/tessellate:tessellate_srcs", |
| 291 |
"//src/gpu/ganesh/text:srcs", |
| 292 |
"//src/text/gpu:gpu_srcs", |
| 293 |
# TODO(kjlubick, egdaniel) Remove this coupling |
| 294 |
"//src/gpu/ganesh/mock:mock_srcs", |
| 295 |
], |
| 296 |
hdrs = [ |
| 297 |
":core_hdrs", |
| 298 |
":core_skslc_hdrs", |
| 299 |
"//include/android:private_hdrs", |
| 300 |
"//include/gpu:shared_gpu_hdrs", |
| 301 |
"//include/gpu/ganesh:ganesh_hdrs", |
| 302 |
"//include/private/gpu/ganesh:private_hdrs", |
| 303 |
"//include/private/chromium:ganesh_private_hdrs", |
| 304 |
"//src/gpu/ganesh/effects:effects_hdrs", |
| 305 |
"//src/gpu/ganesh/geometry:geometry_hdrs", |
| 306 |
"//src/gpu/ganesh/glsl:glsl_hdrs", |
| 307 |
"//src/gpu/ganesh/gradients:gradient_hdrs", |
| 308 |
"//src/gpu/ganesh/image:image_hdrs", |
| 309 |
"//src/gpu/ganesh/ops:ops_hdrs", |
| 310 |
"//src/gpu/ganesh/surface:surface_hdrs", |
| 311 |
"//src/gpu/ganesh/tessellate:tessellate_hdrs", |
| 312 |
"//src/gpu/ganesh/text:private_hdrs", |
| 313 |
"//src/text/gpu:gpu_hdrs", |
| 314 |
# TODO(kjlubick, egdaniel) Remove this coupling |
| 315 |
"//src/gpu/ganesh/mock:mock_hdrs", |
| 316 |
"//include/gpu/ganesh/mock:public_hdrs", |
| 317 |
], |
| 318 |
defines = ["SK_GANESH"], |
| 319 |
features = ["layering_check"], |
| 320 |
visibility = [ |
| 321 |
"//src/gpu/ganesh:__subpackages__", |
| 322 |
"//tools/debugger:__pkg__", |
| 323 |
"//tools/flags:__pkg__", |
| 324 |
], |
| 325 |
deps = [ |
| 326 |
"//:core", |
| 327 |
"//modules/skcms", |
| 328 |
"//src/base", |
| 329 |
"//src/core:core_priv", |
| 330 |
"//src/gpu", |
| 331 |
"//src/sksl/codegen:gpu", |
| 332 |
], |
| 333 |
) |
| 334 |
|
| 335 |
# TODO(lovisolo, kjlubick): Do this with a macro. |
| 336 |
skia_cc_library( |
| 337 |
name = "ganesh_TEST_UTIL", |
| 338 |
testonly = True, |
| 339 |
srcs = [ |
| 340 |
":core_skslc_srcs", |
| 341 |
":core_srcs", |
| 342 |
"//src/gpu/ganesh/effects:effects_srcs", |
| 343 |
"//src/gpu/ganesh/geometry:geometry_srcs", |
| 344 |
"//src/gpu/ganesh/glsl:glsl_srcs", |
| 345 |
"//src/gpu/ganesh/gradients:gradient_srcs", |
| 346 |
"//src/gpu/ganesh/image:image_srcs", |
| 347 |
"//src/gpu/ganesh/ops:ops_srcs", |
| 348 |
"//src/gpu/ganesh/surface:surface_srcs", |
| 349 |
"//src/gpu/ganesh/tessellate:tessellate_srcs", |
| 350 |
"//src/gpu/ganesh/text:srcs", |
| 351 |
"//src/text/gpu:gpu_srcs", |
| 352 |
# TODO(kjlubick, egdaniel) Remove this coupling |
| 353 |
"//src/gpu/ganesh/mock:mock_srcs", |
| 354 |
], |
| 355 |
hdrs = [ |
| 356 |
":core_hdrs", |
| 357 |
":core_skslc_hdrs", |
| 358 |
"//include/android:private_hdrs", |
| 359 |
"//include/gpu:shared_gpu_hdrs", |
| 360 |
"//include/gpu/ganesh:ganesh_hdrs", |
| 361 |
"//include/private/gpu/ganesh:private_hdrs", |
| 362 |
"//include/private/chromium:ganesh_private_hdrs", |
| 363 |
"//src/gpu/ganesh/effects:effects_hdrs", |
| 364 |
"//src/gpu/ganesh/geometry:geometry_hdrs", |
| 365 |
"//src/gpu/ganesh/glsl:glsl_hdrs", |
| 366 |
"//src/gpu/ganesh/gradients:gradient_hdrs", |
| 367 |
"//src/gpu/ganesh/image:image_hdrs", |
| 368 |
"//src/gpu/ganesh/ops:ops_hdrs", |
| 369 |
"//src/gpu/ganesh/surface:surface_hdrs", |
| 370 |
"//src/gpu/ganesh/tessellate:tessellate_hdrs", |
| 371 |
"//src/gpu/ganesh/text:private_hdrs", |
| 372 |
"//src/text/gpu:gpu_hdrs", |
| 373 |
# TODO(kjlubick, egdaniel) Remove this coupling |
| 374 |
"//src/gpu/ganesh/mock:mock_hdrs", |
| 375 |
"//include/gpu/ganesh/mock:public_hdrs", |
| 376 |
], |
| 377 |
defines = [ |
| 378 |
"GPU_TEST_UTILS", |
| 379 |
"SK_GANESH", |
| 380 |
], |
| 381 |
features = ["layering_check"], |
| 382 |
visibility = [ |
| 383 |
"//src/gpu/ganesh:__subpackages__", |
| 384 |
"//tools:__subpackages__", |
| 385 |
], |
| 386 |
deps = [ |
| 387 |
"//:core", |
| 388 |
"//modules/skcms", |
| 389 |
"//src/base", |
| 390 |
"//src/core:core_priv", |
| 391 |
"//src/gpu", |
| 392 |
"//src/sksl/codegen:gpu", |
| 393 |
], |
| 394 |
) |