1load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_objc_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 41# OpenGL needed for CreatePlatformGLTestContext_mac.cpp (which is included as a filegroup). 42skia_objc_library( 43 name = "ganesh_gl_utils_frameworks", 44 sdk_frameworks = ["OpenGL"], 45 deps = [], 46) 47 48skia_cc_library( 49 name = "ganesh_gl_utils", 50 testonly = True, 51 srcs = [ 52 "BackendSurfaceFactory.cpp", 53 "BackendSurfaceFactory.h", 54 "BackendTextureImageFactory.cpp", 55 "BackendTextureImageFactory.h", 56 "ContextType.cpp", 57 "ContextType.h", 58 "FenceSync.h", 59 "FlushFinishTracker.cpp", 60 "FlushFinishTracker.h", 61 "GpuTimer.h", 62 "GrContextFactory.cpp", 63 "GrContextFactory.h", 64 "GrTest.cpp", 65 "ManagedBackendTexture.cpp", 66 "ManagedBackendTexture.h", 67 "MemoryCache.cpp", 68 "MemoryCache.h", 69 "ProtectedUtils.cpp", 70 "ProtectedUtils.h", 71 "ProxyUtils.cpp", 72 "ProxyUtils.h", 73 "TestCanvas.cpp", 74 "TestCanvas.h", 75 "TestContext.cpp", 76 "TestContext.h", 77 "TestOps.cpp", 78 "TestOps.h", 79 "//tools/gpu/gl:private_hdrs", 80 "//tools/gpu/gl:srcs", 81 "//tools/gpu/mock:private_hdrs", 82 "//tools/gpu/mock:srcs", 83 ], 84 hdrs = [ 85 "GrContextFactory.h", 86 "TestCanvas.h", 87 ], 88 visibility = [ 89 "//bench:__subpackages__", 90 "//dm:__pkg__", 91 "//modules/skottie:__pkg__", 92 "//tools:__subpackages__", 93 ], 94 deps = [ 95 "//:core", 96 "//src/base", 97 "//src/core:core_priv", 98 "//src/gpu/ganesh/gl:ganesh_gl_TEST_UTIL", 99 ] + select({ 100 "@platforms//os:macos": [ 101 ":ganesh_gl_utils_frameworks", 102 "//src/gpu/ganesh/gl/mac:mac_factory_TEST_UTIL", 103 "//tools:autorelease_pool_objc", 104 ], 105 "//bazel/common_config_settings:linux_x64": [ 106 "//src/gpu/ganesh/gl/glx:glx_factory_TEST_UTIL", 107 ], 108 "//conditions:default": ["//tools:autorelease_pool"], 109 }), 110) 111 112skia_cc_library( 113 name = "ganesh_vulkan_utils", 114 testonly = True, 115 srcs = [ 116 "BackendSurfaceFactory.cpp", 117 "BackendSurfaceFactory.h", 118 "BackendTextureImageFactory.cpp", 119 "BackendTextureImageFactory.h", 120 "ContextType.cpp", 121 "ContextType.h", 122 "FenceSync.h", 123 "FlushFinishTracker.cpp", 124 "FlushFinishTracker.h", 125 "GpuTimer.h", 126 "GrContextFactory.cpp", 127 "GrContextFactory.h", 128 "GrTest.cpp", 129 "ManagedBackendTexture.cpp", 130 "ManagedBackendTexture.h", 131 "MemoryCache.cpp", 132 "MemoryCache.h", 133 "ProtectedUtils.cpp", 134 "ProtectedUtils.h", 135 "ProxyUtils.cpp", 136 "ProxyUtils.h", 137 "TestContext.cpp", 138 "TestContext.h", 139 "TestOps.cpp", 140 "TestOps.h", 141 "//src/ports:load_dynamic_library", 142 "//tools/gpu/mock:private_hdrs", 143 "//tools/gpu/mock:srcs", 144 "//tools/gpu/vk:private_hdrs", 145 "//tools/gpu/vk:srcs", 146 ], 147 hdrs = [ 148 "GrContextFactory.h", 149 ], 150 target_compatible_with = select({ 151 # We should not be compiling Vulkan tests for macOS. 152 "@platforms//os:macos": ["@platforms//:incompatible"], 153 "//conditions:default": [], 154 }), 155 visibility = [ 156 "//bench:__subpackages__", 157 "//tools:__subpackages__", 158 ], 159 deps = [ 160 "//:core", 161 "//src/base", 162 "//src/core:core_priv", 163 "//src/gpu/ganesh/vk:ganesh_vulkan_TEST_UTIL", 164 "//tests:test_type", 165 "//third_party/vulkanmemoryallocator", 166 "//tools:autorelease_pool", 167 ], 168) 169