| load("@bazel_skylib//lib:selects.bzl", "selects") |
| load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library", "skia_objc_library") |
| |
| package( |
| default_applicable_licenses = ["//:license"], |
| ) |
| |
| licenses(["notice"]) |
| |
| exports_files_legacy() |
| |
| selects.config_setting_group( |
| name = "use_harfbuzz_shaper", |
| match_all = [ |
| "//bazel/common_config_settings:use_harfbuzz_true", |
| ], |
| ) |
| |
| # TODO(kjlubick,bungeman) delete legacy_skshaper (uses legacy non-modular build) |
| |
| skia_cc_library( |
| name = "legacy_harfbuzz", |
| deps = ["@harfbuzz"], |
| ) |
| |
| skia_cc_library( |
| name = "legacy_skshaper", |
| srcs = ["//modules/skshaper/src:srcs"], |
| hdrs = [ |
| "//modules/skshaper/include:hdrs", |
| "//modules/skshaper/utils:core_hdrs", |
| ], |
| defines = [ |
| "SK_SHAPER_UNICODE_AVAILABLE", |
| "SK_SHAPER_PRIMITIVE_AVAILABLE", |
| ] + select({ |
| ":use_harfbuzz_shaper": ["SK_SHAPER_HARFBUZZ_AVAILABLE"], |
| "//conditions:default": [], |
| }), |
| local_defines = ["SKSHAPER_IMPLEMENTATION=1"], |
| visibility = ["//:__subpackages__"], |
| # TODO(kjlubick,bungeman) someday implementation_deps will be available |
| #implementation_deps = ["//modules/skunicode"] + select({ |
| # ":use_harfbuzz_shaper": [ |
| # "@harfbuzz", |
| # ], |
| # "//conditions:default": [], |
| #}), |
| #deps = ["//:skia_internal"] |
| deps = [ |
| "//:skia_internal", |
| "//modules/skunicode:legacy_skunicode", |
| ] + select({ |
| ":use_harfbuzz_shaper": [ |
| ":legacy_harfbuzz", |
| ], |
| "//conditions:default": [], |
| }), |
| ) |
| |
| skia_cc_library( |
| name = "skshaper_core", |
| srcs = [ |
| "//modules/skshaper/src:core_srcs", |
| ], |
| hdrs = [ |
| "//modules/skshaper/include:core_hdrs", |
| ], |
| defines = ["SK_DISABLE_LEGACY_SKSHAPER_FUNCTIONS"], |
| features = ["layering_check"], |
| local_defines = ["SKSHAPER_IMPLEMENTATION=1"], |
| visibility = [ |
| "//modules/skottie:__subpackages__", |
| "//modules/svg:__subpackages__", |
| ], |
| deps = [ |
| "//:core", |
| "//src/base", |
| "//src/core:core_priv", |
| ], |
| ) |
| |
| # This is its own library to make it harder for Skia itself to unintentionally |
| # include FactoryHelpers.h in utils |
| skia_cc_library( |
| name = "skshaper_core_and_utils", |
| hdrs = [ |
| "//modules/skshaper/include:core_hdrs", |
| "//modules/skshaper/utils:core_hdrs", |
| ], |
| local_defines = ["SKSHAPER_IMPLEMENTATION=1"], |
| visibility = [ |
| "//:__pkg__", |
| ], |
| deps = [ |
| ":skshaper_core", |
| ], |
| ) |
| |
| skia_objc_library( |
| name = "skshaper_coretext", |
| srcs = [ |
| "//modules/skshaper/src:coretext_srcs", |
| ], |
| hdrs = [ |
| "//modules/skshaper/include:core_hdrs", |
| "//modules/skshaper/include:coretext_hdrs", |
| "//modules/skshaper/utils:core_hdrs", |
| ], |
| copts = ["-DSKSHAPER_IMPLEMENTATION=1"], |
| defines = [ |
| "SK_SHAPER_CORETEXT_AVAILABLE", |
| "SK_DISABLE_LEGACY_SKSHAPER_FUNCTIONS", |
| ], |
| features = ["layering_check"], |
| ios_frameworks = [ |
| "CoreText", |
| "CoreGraphics", |
| "CoreFoundation", |
| ], |
| mac_frameworks = ["ApplicationServices"], |
| visibility = [ |
| "//:__subpackages__", |
| ], |
| deps = [ |
| ":skshaper_core", |
| "//:core", |
| "//src/base", |
| "//src/core:core_priv", |
| "//src/ports:coretext_typeface", |
| "//src/utils/mac:mac_utils_priv", |
| ], |
| ) |
| |
| skia_cc_library( |
| name = "skshaper_harfbuzz", |
| srcs = [ |
| "//modules/skshaper/src:harfbuzz_srcs", |
| ], |
| hdrs = [ |
| "//modules/skshaper/include:core_hdrs", |
| "//modules/skshaper/include:harfbuzz_hdrs", |
| "//modules/skshaper/utils:core_hdrs", |
| ], |
| defines = [ |
| "SK_SHAPER_HARFBUZZ_AVAILABLE", |
| "SK_DISABLE_LEGACY_SKSHAPER_FUNCTIONS", |
| ], |
| features = ["layering_check"], |
| local_defines = ["SKSHAPER_IMPLEMENTATION=1"], |
| visibility = [ |
| "//:__subpackages__", |
| ], |
| deps = [ |
| ":skshaper_core", |
| "//:core", |
| "//modules/skunicode:skunicode_core", |
| "//src/base", |
| "//src/core:core_priv", |
| ] + |
| # We have this harfbuzz dependency all by itself because we need to turn this into a |
| # select statement when rolling into G3. |
| [ |
| "@harfbuzz", |
| ], |
| ) |
| |
| skia_cc_library( |
| name = "skshaper_unicode", |
| srcs = [ |
| "//modules/skshaper/src:skunicode_srcs", |
| ], |
| hdrs = [ |
| "//modules/skshaper/include:core_hdrs", |
| "//modules/skshaper/include:skunicode_hdrs", |
| "//modules/skshaper/utils:core_hdrs", |
| ], |
| defines = [ |
| "SK_SHAPER_UNICODE_AVAILABLE", |
| "SK_DISABLE_LEGACY_SKSHAPER_FUNCTIONS", |
| ], |
| features = ["layering_check"], |
| local_defines = ["SKSHAPER_IMPLEMENTATION=1"], |
| visibility = [ |
| "//:__subpackages__", |
| ], |
| deps = [ |
| ":skshaper_core", |
| "//:core", |
| "//modules/skunicode:skunicode_core", |
| "//src/base", |
| "//src/core:core_priv", |
| ], |
| ) |