1load("//bazel:skia_rules.bzl", "skia_cc_library") 2 3package( 4 default_applicable_licenses = ["//:license"], 5) 6 7licenses(["notice"]) 8 9skia_cc_library( 10 name = "shared_utils", 11 testonly = True, 12 srcs = [ 13 "BackendSurfaceFactory.cpp", 14 "BackendSurfaceFactory.h", 15 "BackendTextureImageFactory.cpp", 16 "BackendTextureImageFactory.h", 17 "ContextType.cpp", 18 "ContextType.h", 19 "FlushFinishTracker.cpp", 20 "FlushFinishTracker.h", 21 "ManagedBackendTexture.cpp", 22 "ManagedBackendTexture.h", 23 "ProtectedUtils.h", 24 ], 25 hdrs = [ 26 "ContextType.h", 27 ], 28 visibility = [ 29 "//bench:__subpackages__", 30 "//modules/skottie:__pkg__", 31 "//tools:__subpackages__", 32 ], 33 deps = [ 34 "//:core", 35 "//src/base", 36 "//src/core:core_priv", 37 "//src/gpu/ganesh/gl:ganesh_gl_TEST_UTIL", 38 ], 39) 40 41skia_cc_library( 42 name = "ganesh_gl_utils", 43 testonly = True, 44 srcs = [ 45 "BackendSurfaceFactory.cpp", 46 "BackendSurfaceFactory.h", 47 "BackendTextureImageFactory.cpp", 48 "BackendTextureImageFactory.h", 49 "ContextType.cpp", 50 "ContextType.h", 51 "FenceSync.h", 52 "FlushFinishTracker.cpp", 53 "FlushFinishTracker.h", 54 "GpuTimer.h", 55 "GrContextFactory.cpp", 56 "GrContextFactory.h", 57 "GrTest.cpp", 58 "ManagedBackendTexture.cpp", 59 "ManagedBackendTexture.h", 60 "MemoryCache.cpp", 61 "MemoryCache.h", 62 "ProtectedUtils.cpp", 63 "ProtectedUtils.h", 64 "ProxyUtils.cpp", 65 "ProxyUtils.h", 66 "TestCanvas.cpp", 67 "TestCanvas.h", 68 "TestContext.cpp", 69 "TestContext.h", 70 "TestOps.cpp", 71 "TestOps.h", 72 "//tools/gpu/gl:private_hdrs", 73 "//tools/gpu/gl:srcs", 74 "//tools/gpu/mock:private_hdrs", 75 "//tools/gpu/mock:srcs", 76 ], 77 hdrs = [ 78 "GrContextFactory.h", 79 "TestCanvas.h", 80 ], 81 visibility = [ 82 "//bench:__subpackages__", 83 "//dm:__pkg__", 84 "//modules/skottie:__pkg__", 85 "//tools:__subpackages__", 86 ], 87 deps = [ 88 "//:core", 89 "//src/base", 90 "//src/core:core_priv", 91 "//src/gpu/ganesh/gl:ganesh_gl_TEST_UTIL", 92 ] + select({ 93 "@platforms//os:macos": [ 94 "//src/gpu/ganesh/gl/mac:mac_factory_TEST_UTIL", 95 "//tools:autorelease_pool_objc", 96 ], 97 "//bazel/common_config_settings:linux_x64": [ 98 "//src/gpu/ganesh/gl/glx:glx_factory_TEST_UTIL", 99 ], 100 "//conditions:default": ["//tools:autorelease_pool"], 101 }), 102) 103 104skia_cc_library( 105 name = "ganesh_vulkan_utils", 106 testonly = True, 107 srcs = [ 108 "BackendSurfaceFactory.cpp", 109 "BackendSurfaceFactory.h", 110 "BackendTextureImageFactory.cpp", 111 "BackendTextureImageFactory.h", 112 "ContextType.cpp", 113 "ContextType.h", 114 "FenceSync.h", 115 "FlushFinishTracker.cpp", 116 "FlushFinishTracker.h", 117 "GpuTimer.h", 118 "GrContextFactory.cpp", 119 "GrContextFactory.h", 120 "GrTest.cpp", 121 "ManagedBackendTexture.cpp", 122 "ManagedBackendTexture.h", 123 "MemoryCache.cpp", 124 "MemoryCache.h", 125 "ProtectedUtils.cpp", 126 "ProtectedUtils.h", 127 "ProxyUtils.cpp", 128 "ProxyUtils.h", 129 "TestContext.cpp", 130 "TestContext.h", 131 "TestOps.cpp", 132 "TestOps.h", 133 "//src/ports:load_dynamic_library", 134 "//tools/gpu/mock:private_hdrs", 135 "//tools/gpu/mock:srcs", 136 "//tools/gpu/vk:private_hdrs", 137 "//tools/gpu/vk:srcs", 138 ], 139 hdrs = [ 140 "GrContextFactory.h", 141 ], 142 target_compatible_with = select({ 143 # We should not be compiling Vulkan tests for macOS. 144 "@platforms//os:macos": ["@platforms//:incompatible"], 145 "//conditions:default": [], 146 }), 147 visibility = [ 148 "//bench:__subpackages__", 149 "//tools:__subpackages__", 150 ], 151 deps = [ 152 "//:core", 153 "//src/base", 154 "//src/core:core_priv", 155 "//src/gpu/ganesh/vk:ganesh_vulkan_TEST_UTIL", 156 "//tests:test_type", 157 "//third_party/vulkanmemoryallocator", 158 "//tools:autorelease_pool", 159 ], 160) 161