Esempio n. 1
0
srcs = strip_slashes(js['targets']['//:libskqp_app']['sources'])
cflags = strip_slashes(js['targets']['//:libskqp_app']['cflags'])
cflags_cc = strip_slashes(js['targets']['//:libskqp_app']['cflags_cc'])
local_includes = strip_slashes(js['targets']['//:libskqp_app']['include_dirs'])
defines = {str(d) for d in js['targets']['//:libskqp_app']['defines']}

gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'sources', srcs, None)
gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'include_dirs',
                                   local_includes, 'freetype')
gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'defines', defines,
                                   None)

# No need to list headers or other extra flags.
srcs = {s for s in srcs if not s.endswith('.h')}
cflags = gn_to_bp_utils.CleanupCFlags(cflags)
cflags_cc = gn_to_bp_utils.CleanupCCFlags(cflags_cc)

# We need to add the include path to the vulkan defines and header file set in
# then skia_vulkan_header gn arg that is used for framework builds.
local_includes.add("platform_tools/android/vulkan")

# Get architecture specific source files
defs = gn_to_bp_utils.GetArchSources(os.path.join(skia_gn_dir, 'opts.gni'))

# Add source file until fix lands in
# https://skia-review.googlesource.com/c/skia/+/101820
srcs.add("src/ports/SkFontMgr_empty_factory.cpp")


# Turn a list of strings into the style bpfmt outputs.
Esempio n. 2
0
File: gn_to_bp.py Progetto: g40/skia
srcs = android_srcs.intersection(linux_srcs).intersection(mac_srcs)
srcs = srcs.intersection(win_srcs)
android_srcs = android_srcs.difference(srcs)
linux_srcs = linux_srcs.difference(srcs)
mac_srcs = mac_srcs.difference(srcs)
win_srcs = win_srcs.difference(srcs)

gm_srcs = strip_headers(gm_srcs)
test_srcs = strip_headers(test_srcs)
dm_srcs = strip_headers(dm_srcs).difference(gm_srcs).difference(test_srcs)
nanobench_srcs = strip_headers(nanobench_srcs).difference(gm_srcs)

test_minus_gm_includes = test_includes.difference(gm_includes)
test_minus_gm_srcs = test_srcs.difference(gm_srcs)

cflags = gn_to_bp_utils.CleanupCFlags(cflags)
cflags_cc = gn_to_bp_utils.CleanupCCFlags(cflags_cc)

# Execute GN for specialized RenderEngine target
js_renderengine = gn_to_bp_utils.GenerateJSONFromGN(gn_args_renderengine)
renderengine_srcs = strip_slashes(
    js_renderengine['targets']['//:skia']['sources'])
gn_to_bp_utils.GrabDependentValues(js_renderengine, '//:skia', 'sources',
                                   renderengine_srcs, None)
renderengine_srcs = strip_headers(renderengine_srcs)

# Execute GN for specialized SkQP target
skqp_sdk_version = 26
js_skqp = gn_to_bp_utils.GenerateJSONFromGN(
    skqp_gn_args.GetGNArgs(api_level=skqp_sdk_version,
                           debug=False,