| load("//bazel:skia_rules.bzl", "skia_cc_binary") |
| |
| package( |
| default_applicable_licenses = ["//:license"], |
| ) |
| |
| licenses(["notice"]) |
| |
| skia_cc_binary( |
| name = "dm", |
| testonly = True, |
| srcs = [ |
| "DM.cpp", |
| "DMGpuTestProcs.cpp", |
| "DMJsonWriter.cpp", |
| "DMJsonWriter.h", |
| "DMSrcSink.cpp", |
| "DMSrcSink.h", |
| # TODO(b/480952153): Ganesh tests crash at runtime due to missing static initializer registrations under Bazel. |
| # "//tests:ganesh_gl_tests_sources", |
| "//tests:ganesh_test_utils", |
| "//tests:ganesh_tests_sources", |
| # "//tests:graphite_dawn_tests_sources", |
| "//tests:graphite_precompile_tests_sources", |
| # TODO(b/480952153): Fix the sparse_strips target so it can be built and used here. |
| # "//tests:graphite_sparse_strips_test_sources", |
| "//tests:graphite_tests_sources", |
| # TODO(b/480952153): SkJpegGainmapEncoder.h is not being built |
| # "//tests:jpeg_gainmap_tests_sources", |
| "//tests:pathops_tests_sources", |
| "//tests:tests_hdrs", |
| "//tests:tests_sources", |
| "//tools/flags:common_flags_config", |
| "//src/utils:canvas_state_utils", |
| ] + select({ |
| "@platforms//os:linux": [ |
| # "//tests:graphite_vulkan_tests_sources", |
| ], |
| "@platforms//os:windows": [ |
| # "//tests:graphite_vulkan_tests_sources", |
| ], |
| "@platforms//os:macos": [ |
| "//tests:ganesh_metal_tests_sources", |
| "//tests:graphite_metal_tests_sources", |
| ], |
| "//conditions:default": [], |
| }), |
| copts = select({ |
| # Objective-C++ flags are required here to compile the Metal tests (.cc files), since we |
| # build them as part of the dm cc_binary and not as a separate obj-c library to appease the |
| # linker. |
| # See ganesh_metal_tests_sources and graphite_metal_tests_sources for more information. |
| "@platforms//os:macos": [ |
| "-x", |
| "objective-c++", |
| "-fobjc-arc", |
| ], |
| "//conditions:default": [], |
| }), |
| data = [ |
| "//resources", |
| ], |
| deps = [ |
| "//:bmp_decode_codec", |
| "//:core", |
| "//:gif_decode_codec", |
| "//:ico_decode_codec", |
| "//:jpeg_decode_codec", |
| "//:jpeg_encode_codec", |
| "//:jpegxl_decode_codec", |
| "//:pdf_writer", |
| "//:png_decode_codec", |
| "//:png_encode_codec", |
| "//:skshaper_core", |
| "//:svg_renderer", |
| "//:svg_writer", |
| "//:wbmp_decode_codec", |
| "//:webp_decode_codec", |
| "//:webp_encode_codec", |
| "//gm", |
| "//modules/skottie", |
| "//modules/skottie/utils:skottie_utils", |
| "//src/android:animated_image", |
| "//src/codec:android_codec", |
| "//src/gpu/graphite:graphite_TEST_UTIL", |
| "//src/gpu/graphite/precompile:precompile_TEST_UTIL", |
| "//src/lazy", |
| "//src/ports:discardable_memory_none", |
| "//src/ports:imagegenerator", |
| "//src/sksl/codegen:metal", |
| "//src/sksl/codegen:spirv", |
| "//src/sksl/codegen:wgsl", |
| "//src/sksl/tracing:player", |
| "//src/utils:char_to_glyphcache", |
| "//src/utils:multi_picture_document", |
| "//tests", |
| "//tools:autorelease_pool", |
| "//tools:codec_utils", |
| "//tools:gpu_tool_utils", |
| "//tools:hash_and_encode", |
| "//tools:procs_utils", |
| "//tools:runtime_blend_utils", |
| "//tools:stats", |
| "//tools:test_font_data_provider", |
| "//tools:url_data_manager", |
| "//tools/debugger", |
| "//tools/flags:common_flags", |
| "//tools/flags:ganesh_flags", |
| "//tools/flags:graphite_flags", |
| "//tools/fonts:font_tool_utils", |
| "//tools/ganesh:ddl_utils", |
| "//tools/ganesh:ganesh_gl_utils", |
| "//tools/gpu:shared_utils", |
| "//tools/graphite:graphite_utils", |
| "//tools/graphite:precompile_utils", |
| "//tools/sksltrace:sksltraceutils", |
| "//tools/trace", |
| ] + select({ |
| "@platforms//os:macos": [ |
| "//:fontmgr_coretext", |
| "//:typeface_coretext", |
| ], |
| "@platforms//os:windows": [ |
| "//:fontmgr_win_dw", |
| ], |
| "//conditions:default": [ |
| "//:fontmgr_directory_freetype", |
| "//:fontmgr_empty_fontations", |
| ], |
| }), |
| ) |