| load("//bazel:skia_rules.bzl", "exports_files_legacy", "select_multi", "skia_cc_library") |
| |
| licenses(["notice"]) |
| |
| exports_files_legacy() |
| |
| skia_cc_library( |
| name = "utils", |
| testonly = True, |
| srcs = [ |
| "BackendSurfaceFactory.cpp", |
| "BackendSurfaceFactory.h", |
| "BackendTextureImageFactory.cpp", |
| "BackendTextureImageFactory.h", |
| "ContextType.cpp", |
| "ContextType.h", |
| "FenceSync.h", |
| "FlushFinishTracker.cpp", |
| "FlushFinishTracker.h", |
| "GpuTimer.h", |
| "GrContextFactory.cpp", |
| "GrContextFactory.h", |
| "GrTest.cpp", |
| "ManagedBackendTexture.cpp", |
| "ManagedBackendTexture.h", |
| "MemoryCache.cpp", |
| "MemoryCache.h", |
| "ProtectedUtils.cpp", |
| "ProtectedUtils.h", |
| "ProxyUtils.cpp", |
| "ProxyUtils.h", |
| "TestContext.cpp", |
| "TestContext.h", |
| "TestOps.cpp", |
| "TestOps.h", |
| "YUVUtils.cpp", |
| "YUVUtils.h", |
| "//tools/gpu/mock:private_hdrs", |
| "//tools/gpu/mock:srcs", |
| ] + select_multi({ |
| "//src/gpu:gl_ganesh": [ |
| "//tools/gpu/gl:private_hdrs", |
| "//tools/gpu/gl:srcs", |
| ], |
| "//src/gpu:vulkan_ganesh": [ |
| "//tools/gpu/vk:private_hdrs", |
| "//tools/gpu/vk:srcs", |
| ], |
| "//src/gpu:metal_ganesh": [ |
| "//tools/gpu/mtl:private_hdrs", |
| "//tools/gpu/mtl:srcs", |
| ], |
| # TODO(kjlubick) Handle other backends |
| }), |
| hdrs = [ |
| "GrContextFactory.h", |
| ], |
| visibility = [ |
| "//bench:__pkg__", |
| "//modules/skottie:__pkg__", |
| "//tests:__pkg__", |
| "//tools/testrunners/benchmark/target:__pkg__", |
| "//tools/testrunners/common/surface_manager:__pkg__", |
| "//tools/viewer:__pkg__", |
| ], |
| deps = ["//:skia_internal"] + select_multi({ |
| "//src/gpu:gl_ganesh": ["//tools/gpu/gl:deps"], |
| }) + select({ |
| "@platforms//os:macos": ["//tools:autorelease_pool_objc"], |
| "//conditions:default": ["//tools:autorelease_pool"], |
| }), |
| ) |