1load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library") 2load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags") 3 4licenses(["notice"]) 5 6exports_files_legacy() 7 8skia_cc_library( 9 name = "skottie", 10 srcs = [ 11 "//modules/skottie/src:srcs", 12 "//src/utils:json_hdrs", 13 "//src/utils:json_srcs", 14 ], 15 hdrs = ["//modules/skottie/include:hdrs"], 16 visibility = ["//:__subpackages__"], 17 deps = [ 18 "//:skia_internal", 19 "//modules/skresources", 20 "//modules/sksg", 21 "//modules/skshaper", 22 "//modules/skunicode", 23 ], 24) 25 26skia_cc_library( 27 name = "utils", 28 srcs = ["//modules/skottie/utils:srcs"], 29 hdrs = ["//modules/skottie/utils:hdrs"], 30 visibility = ["//:__subpackages__"], 31 deps = [ 32 ":skottie", 33 ], 34) 35 36cc_binary_with_flags( 37 name = "skottie_tool_cpu", 38 testonly = True, 39 srcs = [ 40 "//modules/skottie/src:skottie_tool", 41 "//tools/flags", 42 ], 43 defines = ["CPU_ONLY"], 44 set_flags = { 45 "fontmgr_factory": ["custom_directory_fontmgr_factory"], 46 "include_decoder": [ 47 "jpeg_decode_codec", 48 "png_decode_codec", 49 "webp_decode_codec", 50 ], 51 "enable_sksl": ["True"], 52 "use_harfbuzz": ["True"], 53 "use_icu": ["True"], 54 }, 55 deps = [ 56 ":skottie", 57 ":utils", 58 ], 59) 60 61cc_binary_with_flags( 62 name = "skottie_tool_gpu", 63 testonly = True, 64 srcs = [ 65 "//modules/skottie/src:skottie_tool", 66 "//tools/flags", 67 ], 68 defines = ["GPU_ONLY"], 69 set_flags = { 70 "enable_gpu_test_utils": ["True"], 71 "fontmgr_factory": ["custom_directory_fontmgr_factory"], 72 "gpu_backend": ["gl_backend"], 73 "include_decoder": [ 74 "jpeg_decode_codec", 75 "png_decode_codec", 76 "webp_decode_codec", 77 ], 78 "use_harfbuzz": ["True"], 79 "use_icu": ["True"], 80 "with_gl_standard": ["gl_standard"], 81 }, 82 deps = [ 83 ":skottie", 84 ":utils", 85 "//tools/gpu:utils", 86 ], 87) 88