1load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_filegroup", "split_srcs_and_hdrs") 2 3licenses(["notice"]) 4 5exports_files_legacy() 6 7CORE_FILES = [ 8 "SkImage.cpp", 9 "SkImage_Base.h", 10 "SkImage_Lazy.cpp", 11 "SkImage_Lazy.h", 12 "SkImage_Raster.cpp", 13 "SkRescaleAndReadPixels.cpp", 14 "SkRescaleAndReadPixels.h", 15 "SkSurface.cpp", 16 "SkSurface_Base.h", 17 "SkSurface_Raster.cpp", 18] 19 20split_srcs_and_hdrs( 21 name = "core", 22 files = CORE_FILES, 23) 24 25GPU_FILES = [ 26 "SkImage_Gpu.cpp", 27 "SkImage_Gpu.h", 28 "SkImage_GpuBase.cpp", 29 "SkImage_GpuBase.h", 30 "SkImage_GpuYUVA.cpp", 31 "SkImage_GpuYUVA.h", 32 "SkSurface_Gpu.cpp", 33 "SkSurface_Gpu.h", 34] 35 36split_srcs_and_hdrs( 37 name = "gpu", 38 files = GPU_FILES, 39) 40 41# Not referenced by Bazel target. 42# File group use to export to //gn/gpu.gni:skia_metal_sources. 43skia_filegroup( 44 name = "mtl_srcs", 45 srcs = ["SkSurface_GpuMtl.mm"], 46) 47 48skia_filegroup( 49 name = "srcs", 50 srcs = [":core_srcs"] + select({ 51 "//src/gpu:has_gpu_backend": [":gpu_srcs"], 52 "//conditions:default": [], 53 }), 54 visibility = ["//src:__pkg__"], 55) 56 57skia_filegroup( 58 name = "private_hdrs", 59 srcs = [":core_hdrs"] + select({ 60 "//src/gpu:has_gpu_backend": [":gpu_hdrs"], 61 "//conditions:default": [], 62 }), 63 visibility = ["//src:__pkg__"], 64) 65