Hal Canary | 32498f0 | 2019-02-04 15:36:31 -0500 | [diff] [blame] | 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 | |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 5 | if (!defined(is_skia_standalone)) { |
| 6 | is_skia_standalone = false |
Hal Canary | 32498f0 | 2019-02-04 15:36:31 -0500 | [diff] [blame] | 7 | } |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 8 | |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 9 | is_skia_dev_build = is_skia_standalone && !is_official_build |
Hal Canary | 3e710b0 | 2019-09-04 10:05:33 -0400 | [diff] [blame] | 10 | |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 11 | declare_args() { |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 12 | skia_android_serial = "" |
| 13 | skia_compile_processors = false |
| 14 | skia_enable_ccpr = true |
| 15 | skia_enable_discrete_gpu = true |
| 16 | skia_enable_flutter_defines = false |
| 17 | skia_enable_fontmgr_empty = false |
| 18 | skia_enable_fontmgr_fuchsia = is_fuchsia |
| 19 | skia_enable_fontmgr_win = is_win |
| 20 | skia_enable_fontmgr_win_gdi = is_win |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 21 | skia_enable_gpu = true |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 22 | skia_enable_pdf = true |
Hal Canary | 60ff651 | 2020-01-21 12:39:20 -0500 | [diff] [blame] | 23 | skia_enable_skottie = !(is_win && is_component_build) |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 24 | skia_enable_sksl_interpreter = is_skia_dev_build |
| 25 | skia_enable_skvm_jit = |
| 26 | is_skia_dev_build && ((target_cpu == "x64" && (is_linux || is_mac)) || |
| 27 | (target_cpu == "arm64" && is_android)) |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 28 | skia_enable_tools = is_skia_dev_build |
Jim Van Verth | 03b8ab2 | 2020-02-24 11:36:15 -0500 | [diff] [blame] | 29 | skia_enable_gpu_debug_layers = is_skia_dev_build && is_debug |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 30 | skia_generate_workarounds = false |
| 31 | skia_include_multiframe_procs = false |
| 32 | skia_lex = false |
Hal Canary | 2dad990 | 2019-11-20 16:01:31 -0500 | [diff] [blame] | 33 | skia_libgifcodec_path = "third_party/externals/libgifcodec" |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 34 | skia_pdf_subset_harfbuzz = false # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz. |
| 35 | skia_qt_path = getenv("QT_PATH") |
| 36 | skia_skqp_global_error_tolerance = 0 |
| 37 | skia_tools_require_resources = false |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 38 | skia_update_fuchsia_sdk = false |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 39 | skia_use_angle = false |
| 40 | skia_use_dawn = false |
Jim Van Verth | b01e12b | 2020-02-18 14:34:38 -0500 | [diff] [blame] | 41 | skia_use_direct3d = false |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 42 | skia_use_egl = false |
| 43 | skia_use_expat = true |
| 44 | skia_use_experimental_xform = false |
| 45 | skia_use_ffmpeg = false |
| 46 | skia_use_fixed_gamma_text = is_android |
| 47 | skia_use_fontconfig = is_linux |
| 48 | skia_use_fonthost_mac = is_mac |
| 49 | skia_use_freetype = is_android || is_fuchsia || is_linux |
Kevin Lubick | 867da4b | 2019-02-22 15:55:39 -0500 | [diff] [blame] | 50 | skia_use_harfbuzz = true |
John Rosasco | a9b348f | 2019-11-08 13:18:15 -0800 | [diff] [blame] | 51 | skia_use_gl = !is_fuchsia |
Julia Lavrova | e65c5fc | 2020-03-09 09:59:56 -0400 | [diff] [blame^] | 52 | skia_use_icu = !is_fuchsia |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 53 | skia_use_libheif = is_skia_dev_build |
Mike Klein | 9d4b788 | 2020-03-06 21:39:05 +0000 | [diff] [blame] | 54 | skia_use_libjpeg_turbo = true |
| 55 | skia_use_libpng = true |
| 56 | skia_use_libwebp = true |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 57 | skia_use_lua = is_skia_dev_build && !is_ios |
| 58 | skia_use_metal = false |
| 59 | skia_use_opencl = false |
| 60 | skia_use_piex = !is_win |
| 61 | skia_use_wuffs = false |
| 62 | skia_use_x11 = is_linux |
| 63 | skia_use_xps = true |
| 64 | skia_use_zlib = true |
| 65 | |
| 66 | if (is_ios) { |
| 67 | skia_ios_identity = ".*Google.*" |
| 68 | skia_ios_profile = "Google Development" |
| 69 | } |
| 70 | |
| 71 | if (is_mac) { |
| 72 | skia_gl_standard = "gl" |
| 73 | } else if (is_ios) { |
| 74 | skia_gl_standard = "gles" |
| 75 | } else { |
| 76 | skia_gl_standard = "" |
| 77 | } |
| 78 | |
| 79 | if (is_android) { |
| 80 | skia_use_vulkan = defined(ndk_api) && ndk_api >= 24 |
| 81 | } else if (is_fuchsia) { |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 82 | skia_use_vulkan = true |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 83 | } else { |
| 84 | skia_use_vulkan = defined(skia_moltenvk_path) && skia_moltenvk_path != "" |
| 85 | } |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 86 | } |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 87 | |
Hal Canary | 2a3093c | 2019-02-20 11:25:45 -0500 | [diff] [blame] | 88 | declare_args() { |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 89 | skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu |
| 90 | skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype |
| 91 | skia_enable_fontmgr_custom = |
| 92 | is_linux && skia_use_freetype && !skia_use_fontconfig |
| 93 | skia_enable_fontmgr_custom_empty = is_fuchsia && skia_use_freetype |
| 94 | skia_enable_nvpr = !skia_enable_flutter_defines |
| 95 | skia_enable_spirv_validation = is_skia_dev_build && is_debug && !skia_use_dawn |
Mike Klein | 9d4b788 | 2020-03-06 21:39:05 +0000 | [diff] [blame] | 96 | skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib |
Hal Canary | 2dad990 | 2019-11-20 16:01:31 -0500 | [diff] [blame] | 97 | skia_use_libgifcodec = !skia_use_wuffs |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 98 | skia_use_sfntly = skia_use_icu |
Jim Van Verth | 03b8ab2 | 2020-02-24 11:36:15 -0500 | [diff] [blame] | 99 | skia_enable_vulkan_debug_layers = skia_enable_gpu_debug_layers |
| 100 | skia_enable_direct3d_debug_layer = skia_enable_gpu_debug_layers |
Hal Canary | 2a3093c | 2019-02-20 11:25:45 -0500 | [diff] [blame] | 101 | } |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 102 | |
| 103 | # Our tools require static linking (they use non-exported symbols), and the GPU backend. |
| 104 | skia_enable_tools = skia_enable_tools && !is_component_build && skia_enable_gpu |