Debian Codegraph @

gn/skqp_gn_args.py

raw
1 # Copyright 2019 Google LLC.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 def GetGNArgs(api_level, debug, arch=None, ndk=None, is_android_bp=False):
6 gn_args = {
7 'ndk_api': api_level,
8 'is_debug': 'true' if debug else 'false',
9 'skia_enable_fontmgr_android': 'false',
10 'skia_enable_fontmgr_empty': 'true',
11 'skia_enable_graphite': 'true',
12 'skia_enable_pdf': 'false',
13 'skia_enable_skottie': 'false',
14 'skia_enable_skshaper': 'false',
15 'skia_enable_svg': 'false',
16 'skia_enable_tools': 'true',
17 'skia_tools_require_resources': 'true',
18 'skia_use_dng_sdk': 'false',
19 'skia_use_expat': 'true',
20 'skia_use_freetype': 'false',
21 'skia_use_icu': 'false',
22 'skia_use_lua': 'false',
23 'skia_use_piex': 'false',
24 'skia_use_vulkan': 'true',
25 'skia_use_wuffs': 'true',
26 }
27
28 def gn_quote(s):
29 return '"%s"' % s
30
31 if is_android_bp is True:
32 gn_args.update({
33 'target_os': gn_quote("android"),
34 'target_cpu': gn_quote("none"),
35 'is_official_build': 'true',
36 # gn_to_bp.py copies vk_mem_alloc.h to //vma_android/include
37 'skia_vulkan_memory_allocator_dir': '"//vma_android"',
38 })
39 else:
40 gn_args.update({
41 'target_cpu': gn_quote(arch),
42 'ndk': gn_quote(ndk),
43 })
44 return gn_args