xref: /third_party/skia/tools/skqp/skqp_gn_args.py (revision cb93a386)
1cb93a386Sopenharmony_ci# Copyright 2019 Google LLC.
2cb93a386Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be
3cb93a386Sopenharmony_ci# found in the LICENSE file.
4cb93a386Sopenharmony_ci
5cb93a386Sopenharmony_ciSkqpGnArgs = {
6cb93a386Sopenharmony_ci    'extra_cflags':                     '[ "-DSK_ENABLE_DUMP_GPU", "-DSK_BUILD_FOR_SKQP" ]',
7cb93a386Sopenharmony_ci    'skia_enable_fontmgr_android':      'false',
8cb93a386Sopenharmony_ci    'skia_enable_fontmgr_empty':        'true',
9cb93a386Sopenharmony_ci    'skia_enable_pdf':                  'false',
10cb93a386Sopenharmony_ci    'skia_enable_skottie':              'false',
11cb93a386Sopenharmony_ci    'skia_skqp_global_error_tolerance': '8',
12cb93a386Sopenharmony_ci    'skia_tools_require_resources':     'true',
13cb93a386Sopenharmony_ci    'skia_use_dng_sdk':                 'false',
14cb93a386Sopenharmony_ci    'skia_use_expat':                   'true',
15cb93a386Sopenharmony_ci    'skia_use_icu':                     'false',
16cb93a386Sopenharmony_ci    'skia_use_libheif':                 'false',
17cb93a386Sopenharmony_ci    'skia_use_lua':                     'false',
18cb93a386Sopenharmony_ci    'skia_use_piex':                    'false',
19cb93a386Sopenharmony_ci    'skia_use_vulkan':                  'true',
20cb93a386Sopenharmony_ci}
21cb93a386Sopenharmony_ci
22cb93a386Sopenharmony_cidef GetGNArgs(arch, android_ndk, debug, api_level):
23cb93a386Sopenharmony_ci    def gn_quote(s):
24cb93a386Sopenharmony_ci        return '"%s"' % s
25cb93a386Sopenharmony_ci    gn_args = {
26cb93a386Sopenharmony_ci        'target_cpu':  gn_quote(arch),
27cb93a386Sopenharmony_ci        'ndk':         gn_quote(android_ndk),
28cb93a386Sopenharmony_ci        'is_debug':    'true' if debug else 'false',
29cb93a386Sopenharmony_ci        'ndk_api':     api_level,
30cb93a386Sopenharmony_ci    }
31cb93a386Sopenharmony_ci    gn_args.update(SkqpGnArgs)
32cb93a386Sopenharmony_ci    return gn_args
33