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 |
Chinmay Garde | f832c0a | 2020-03-18 14:37:23 -0700 | [diff] [blame] | 14 | skia_enable_api_available_macro = true |
Leon Scroggins III | 63cfb36 | 2020-04-24 13:00:48 -0400 | [diff] [blame] | 15 | skia_enable_android_utils = is_skia_dev_build |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 16 | skia_enable_ccpr = true |
| 17 | skia_enable_discrete_gpu = true |
| 18 | skia_enable_flutter_defines = false |
| 19 | skia_enable_fontmgr_empty = false |
| 20 | skia_enable_fontmgr_fuchsia = is_fuchsia |
| 21 | skia_enable_fontmgr_win = is_win |
| 22 | skia_enable_fontmgr_win_gdi = is_win |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 23 | skia_enable_gpu = true |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 24 | skia_enable_pdf = true |
Hal Canary | 60ff651 | 2020-01-21 12:39:20 -0500 | [diff] [blame] | 25 | skia_enable_skottie = !(is_win && is_component_build) |
Florin Malita | 26ae40f | 2020-06-08 12:03:48 -0400 | [diff] [blame] | 26 | skia_enable_skrive = true |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 27 | skia_enable_sksl_interpreter = is_skia_dev_build |
| 28 | skia_enable_skvm_jit = |
Mike Klein | 511cf4f | 2020-06-23 17:21:06 -0500 | [diff] [blame] | 29 | is_skia_dev_build && |
| 30 | ((target_cpu == "x64" && (is_linux || is_mac || is_win)) || |
| 31 | (target_cpu == "arm64" && is_android)) |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 32 | skia_enable_tools = is_skia_dev_build |
Jim Van Verth | 03b8ab2 | 2020-02-24 11:36:15 -0500 | [diff] [blame] | 33 | skia_enable_gpu_debug_layers = is_skia_dev_build && is_debug |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 34 | skia_generate_workarounds = false |
| 35 | skia_include_multiframe_procs = false |
| 36 | skia_lex = false |
Hal Canary | 2dad990 | 2019-11-20 16:01:31 -0500 | [diff] [blame] | 37 | skia_libgifcodec_path = "third_party/externals/libgifcodec" |
Mike Klein | 96f6401 | 2020-04-03 10:59:37 -0500 | [diff] [blame] | 38 | skia_pdf_subset_harfbuzz = |
| 39 | false # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz. |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 40 | skia_qt_path = getenv("QT_PATH") |
| 41 | skia_skqp_global_error_tolerance = 0 |
| 42 | skia_tools_require_resources = false |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 43 | skia_update_fuchsia_sdk = false |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 44 | skia_use_angle = false |
| 45 | skia_use_dawn = false |
Jim Van Verth | b01e12b | 2020-02-18 14:34:38 -0500 | [diff] [blame] | 46 | skia_use_direct3d = false |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 47 | skia_use_egl = false |
| 48 | skia_use_expat = true |
| 49 | skia_use_experimental_xform = false |
| 50 | skia_use_ffmpeg = false |
| 51 | skia_use_fixed_gamma_text = is_android |
| 52 | skia_use_fontconfig = is_linux |
Ben Wagner | d13487e | 2020-06-03 23:29:43 -0400 | [diff] [blame] | 53 | skia_use_fonthost_mac = is_mac || is_ios |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 54 | skia_use_freetype = is_android || is_fuchsia || is_linux |
Kevin Lubick | 867da4b | 2019-02-22 15:55:39 -0500 | [diff] [blame] | 55 | skia_use_harfbuzz = true |
John Rosasco | a9b348f | 2019-11-08 13:18:15 -0800 | [diff] [blame] | 56 | skia_use_gl = !is_fuchsia |
Julia Lavrova | e65c5fc | 2020-03-09 09:59:56 -0400 | [diff] [blame] | 57 | skia_use_icu = !is_fuchsia |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 58 | skia_use_libheif = is_skia_dev_build |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 59 | skia_use_libjpeg_turbo_decode = true |
| 60 | skia_use_libjpeg_turbo_encode = true |
| 61 | skia_use_libpng_decode = true |
| 62 | skia_use_libpng_encode = true |
| 63 | skia_use_libwebp_decode = true |
| 64 | skia_use_libwebp_encode = true |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 65 | skia_use_lua = is_skia_dev_build && !is_ios |
| 66 | skia_use_metal = false |
| 67 | skia_use_opencl = false |
| 68 | skia_use_piex = !is_win |
| 69 | skia_use_wuffs = false |
| 70 | skia_use_x11 = is_linux |
| 71 | skia_use_xps = true |
| 72 | skia_use_zlib = true |
| 73 | |
Mike Klein | 2b54e83 | 2020-07-10 12:56:07 -0500 | [diff] [blame] | 74 | skia_vtune_path = "" |
| 75 | |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 76 | if (is_ios) { |
| 77 | skia_ios_identity = ".*Google.*" |
| 78 | skia_ios_profile = "Google Development" |
| 79 | } |
| 80 | |
| 81 | if (is_mac) { |
| 82 | skia_gl_standard = "gl" |
| 83 | } else if (is_ios) { |
| 84 | skia_gl_standard = "gles" |
| 85 | } else { |
| 86 | skia_gl_standard = "" |
| 87 | } |
| 88 | |
| 89 | if (is_android) { |
| 90 | skia_use_vulkan = defined(ndk_api) && ndk_api >= 24 |
| 91 | } else if (is_fuchsia) { |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 92 | skia_use_vulkan = true |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 93 | } else { |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 94 | skia_use_vulkan = false |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 95 | } |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 96 | } |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 97 | |
Hal Canary | 2a3093c | 2019-02-20 11:25:45 -0500 | [diff] [blame] | 98 | declare_args() { |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 99 | skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 100 | skia_enable_fontmgr_custom_directory = skia_use_freetype && !is_fuchsia |
| 101 | skia_enable_fontmgr_custom_embedded = skia_use_freetype && !is_fuchsia |
| 102 | skia_enable_fontmgr_custom_empty = skia_use_freetype |
| 103 | skia_enable_fontmgr_fontconfig = skia_use_freetype && skia_use_fontconfig |
| 104 | skia_enable_fontmgr_FontConfigInterface = |
| 105 | skia_use_freetype && skia_use_fontconfig |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 106 | skia_enable_nvpr = !skia_enable_flutter_defines |
| 107 | skia_enable_spirv_validation = is_skia_dev_build && is_debug && !skia_use_dawn |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 108 | skia_use_dng_sdk = |
| 109 | !is_fuchsia && skia_use_libjpeg_turbo_decode && skia_use_zlib |
Hal Canary | 2dad990 | 2019-11-20 16:01:31 -0500 | [diff] [blame] | 110 | skia_use_libgifcodec = !skia_use_wuffs |
Hal Canary | c7b263b | 2019-09-03 13:46:25 -0400 | [diff] [blame] | 111 | skia_use_sfntly = skia_use_icu |
Jim Van Verth | 03b8ab2 | 2020-02-24 11:36:15 -0500 | [diff] [blame] | 112 | skia_enable_vulkan_debug_layers = skia_enable_gpu_debug_layers |
| 113 | skia_enable_direct3d_debug_layer = skia_enable_gpu_debug_layers |
Greg Daniel | b16beb9 | 2020-04-27 14:26:21 +0000 | [diff] [blame] | 114 | skia_use_vma = skia_use_vulkan |
Hal Canary | 2a3093c | 2019-02-20 11:25:45 -0500 | [diff] [blame] | 115 | } |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 116 | |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 117 | declare_args() { |
| 118 | # skia_fontmgr_factory should define SkFontMgr::Factory() |
| 119 | if (skia_enable_fontmgr_empty) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 120 | skia_fontmgr_factory = ":fontmgr_empty_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 121 | } else if (is_android && skia_enable_fontmgr_android) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 122 | skia_fontmgr_factory = ":fontmgr_android_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 123 | } else if (is_win && skia_enable_fontmgr_win) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 124 | skia_fontmgr_factory = ":fontmgr_win_factory" |
Chris Bracken | 72f403c | 2020-06-17 14:10:52 -0700 | [diff] [blame] | 125 | } else if ((is_mac || is_ios) && skia_use_fonthost_mac) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 126 | skia_fontmgr_factory = ":fontmgr_mac_ct_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 127 | } else if (skia_enable_fontmgr_fontconfig) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 128 | skia_fontmgr_factory = ":fontmgr_fontconfig_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 129 | } else if (skia_enable_fontmgr_custom_directory) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 130 | skia_fontmgr_factory = ":fontmgr_custom_directory_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 131 | } else if (skia_enable_fontmgr_custom_embedded) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 132 | skia_fontmgr_factory = ":fontmgr_custom_embedded_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 133 | } else if (skia_enable_fontmgr_custom_empty) { |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 134 | skia_fontmgr_factory = ":fontmgr_custom_empty_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 135 | } else { |
| 136 | #"src/ports/SkFontMgr_FontConfigInterface_factory.cpp" #WontFix |
| 137 | #"src/ports/SkFontMgr_win_gdi_factory.cpp" # WontFix |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 138 | skia_fontmgr_factory = ":fontmgr_empty_factory" |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 139 | } |
| 140 | } |
| 141 | |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 142 | # Our tools require static linking (they use non-exported symbols), and the GPU backend. |
| 143 | skia_enable_tools = skia_enable_tools && !is_component_build && skia_enable_gpu |