mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1 | # Copyright 2016 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
Brian Osman | f2c9014 | 2017-07-13 15:50:03 -0400 | [diff] [blame] | 6 | import("gn/flutter_defines.gni") |
Mike Reed | 025f783 | 2018-11-12 09:27:05 -0500 | [diff] [blame] | 7 | import("gn/fuchsia_defines.gni") |
mikejurka | 8c24f4f | 2016-09-12 16:51:58 -0700 | [diff] [blame] | 8 | import("gn/shared_sources.gni") |
Hal Canary | 45812a1 | 2019-09-04 08:58:59 -0400 | [diff] [blame] | 9 | import("gn/skia.gni") |
| 10 | |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 11 | if (is_fuchsia) { |
| 12 | import("//build/fuchsia/sdk.gni") |
| 13 | import("build/fuchsia/fuchsia_download_sdk.gni") |
| 14 | } |
| 15 | |
Stephen White | 0d70b71 | 2019-07-10 15:51:30 -0400 | [diff] [blame] | 16 | if (skia_use_dawn) { |
| 17 | import("third_party/externals/dawn/scripts/dawn_features.gni") |
| 18 | } |
| 19 | |
Adam Barth | 54ef74a | 2017-10-13 10:59:38 -0700 | [diff] [blame] | 20 | if (defined(skia_settings)) { |
| 21 | import(skia_settings) |
| 22 | } |
| 23 | |
Hal Canary | 3388c1a | 2019-09-16 12:53:17 -0400 | [diff] [blame] | 24 | import("gn/ios.gni") |
| 25 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 26 | # Skia public API, generally provided by :skia. |
| 27 | config("skia_public") { |
Mike Klein | 9e25bb9 | 2019-04-29 09:46:36 -0500 | [diff] [blame] | 28 | include_dirs = [ "." ] |
| 29 | |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 30 | defines = [] |
Chinmay Garde | f832c0a | 2020-03-18 14:37:23 -0700 | [diff] [blame] | 31 | cflags_objcc = [] |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 32 | if (is_component_build) { |
| 33 | defines += [ "SKIA_DLL" ] |
| 34 | } |
Mike Klein | c4cbd74 | 2016-09-26 21:37:09 -0400 | [diff] [blame] | 35 | if (is_fuchsia || is_linux) { |
Mike Klein | f0a5369 | 2019-04-24 11:42:40 -0500 | [diff] [blame] | 36 | defines += [ "SK_R32_SHIFT=16" ] |
jcgregorio | 5561e3d | 2016-08-25 09:25:11 -0700 | [diff] [blame] | 37 | } |
Brian Osman | f2c9014 | 2017-07-13 15:50:03 -0400 | [diff] [blame] | 38 | if (skia_enable_flutter_defines) { |
| 39 | defines += flutter_defines |
| 40 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 41 | if (!skia_enable_gpu) { |
| 42 | defines += [ "SK_SUPPORT_GPU=0" ] |
| 43 | } |
Brian Osman | 946a4cb | 2021-07-12 17:02:21 -0400 | [diff] [blame] | 44 | if (skia_enable_sksl) { |
| 45 | defines += [ "SK_ENABLE_SKSL" ] |
| 46 | } |
Mike Reed | 025f783 | 2018-11-12 09:27:05 -0500 | [diff] [blame] | 47 | if (is_fuchsia) { |
| 48 | defines += fuchsia_defines |
| 49 | } |
Kevin Lubick | 27ba703 | 2019-03-21 08:13:54 -0400 | [diff] [blame] | 50 | if (skia_gl_standard == "gles") { |
| 51 | defines += [ "SK_ASSUME_GL_ES=1" ] |
| 52 | } else if (skia_gl_standard == "gl") { |
| 53 | defines += [ "SK_ASSUME_GL=1" ] |
Kevin Lubick | 3902628 | 2019-03-28 12:46:40 -0400 | [diff] [blame] | 54 | } else if (skia_gl_standard == "webgl") { |
Kevin Lubick | 2f9a098 | 2020-08-20 10:33:39 -0400 | [diff] [blame] | 55 | defines += [ |
| 56 | "SK_ASSUME_WEBGL=1", |
| 57 | "SK_USE_WEBGL", |
| 58 | ] |
Kevin Lubick | 27ba703 | 2019-03-21 08:13:54 -0400 | [diff] [blame] | 59 | } |
Robert Phillips | 024668c | 2021-07-01 12:12:52 -0400 | [diff] [blame] | 60 | if (skia_enable_skgpu_v2) { |
Robert Phillips | 7cef678 | 2021-07-01 13:21:37 -0400 | [diff] [blame] | 61 | defines += [ "SK_GPU_V2=1" ] |
Robert Phillips | 7b931f8 | 2021-06-09 14:04:05 -0400 | [diff] [blame] | 62 | } |
Robert Phillips | 024668c | 2021-07-01 12:12:52 -0400 | [diff] [blame] | 63 | if (!skia_enable_skgpu_v1) { |
Robert Phillips | 7cef678 | 2021-07-01 13:21:37 -0400 | [diff] [blame] | 64 | defines += [ "SK_GPU_V1=0" ] |
Robert Phillips | 3b97aa2 | 2021-05-03 11:42:40 -0400 | [diff] [blame] | 65 | } |
Chinmay Garde | f832c0a | 2020-03-18 14:37:23 -0700 | [diff] [blame] | 66 | |
| 67 | # Some older versions of the Clang toolchain change the visibility of |
| 68 | # symbols decorated with API_AVAILABLE macro to be visible. Users of such |
| 69 | # toolchains suppress the use of this macro till toolchain updates are made. |
| 70 | if (is_mac || is_ios) { |
| 71 | if (skia_enable_api_available_macro) { |
| 72 | defines += [ "SK_ENABLE_API_AVAILABLE" ] |
| 73 | } else { |
| 74 | cflags_objcc += [ "-Wno-unguarded-availability" ] |
| 75 | } |
| 76 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | # Skia internal APIs, used by Skia itself and a few test tools. |
| 80 | config("skia_private") { |
Mike Klein | 4f4c064 | 2021-01-15 07:20:33 -0600 | [diff] [blame] | 81 | visibility = [ "./*" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 82 | |
Mike Reed | a9e241d | 2017-05-03 10:52:00 -0400 | [diff] [blame] | 83 | defines = [ "SK_GAMMA_APPLY_TO_A8" ] |
Leon Scroggins III | c41a5f5 | 2018-11-15 15:54:59 -0500 | [diff] [blame] | 84 | if (skia_use_fixed_gamma_text) { |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 85 | defines += [ |
| 86 | "SK_GAMMA_EXPONENT=1.4", |
| 87 | "SK_GAMMA_CONTRAST=0.0", |
| 88 | ] |
| 89 | } |
Mike Klein | b45d862 | 2019-04-24 14:04:01 -0500 | [diff] [blame] | 90 | if (is_skia_dev_build) { |
| 91 | defines += [ |
| 92 | "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1", |
| 93 | "GR_TEST_UTILS=1", |
| 94 | ] |
mtklein | 88a7ac0 | 2016-09-14 11:16:49 -0700 | [diff] [blame] | 95 | } |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 96 | libs = [] |
| 97 | lib_dirs = [] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 98 | if (skia_use_gl && skia_use_angle) { |
Brian Osman | 34755e2 | 2016-12-05 09:46:02 -0500 | [diff] [blame] | 99 | defines += [ "SK_ANGLE" ] |
| 100 | } |
Greg Daniel | b16beb9 | 2020-04-27 14:26:21 +0000 | [diff] [blame] | 101 | if (skia_use_vma) { |
| 102 | defines += [ "SK_USE_VMA" ] |
| 103 | } |
James Clarke | b8c0dab | 2021-02-09 06:22:41 -0800 | [diff] [blame] | 104 | if (skia_enable_winuwp) { |
James Clarke | b2bfa9d | 2021-02-18 19:54:42 -0800 | [diff] [blame] | 105 | defines += [ "SK_WINUWP" ] |
James Clarke | b8c0dab | 2021-02-09 06:22:41 -0800 | [diff] [blame] | 106 | } |
| 107 | } |
| 108 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 109 | # Any code that's linked into Skia-the-library should use this config via += skia_library_configs. |
| 110 | config("skia_library") { |
Mike Klein | 4f4c064 | 2021-01-15 07:20:33 -0600 | [diff] [blame] | 111 | visibility = [ "./*" ] |
Mike Klein | f5f4e81 | 2019-04-29 15:45:14 +0000 | [diff] [blame] | 112 | defines = [ "SKIA_IMPLEMENTATION=1" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | skia_library_configs = [ |
| 116 | ":skia_public", |
| 117 | ":skia_private", |
| 118 | ":skia_library", |
| 119 | ] |
| 120 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 121 | # Use for CPU-specific Skia code that needs particular compiler flags. |
| 122 | template("opts") { |
| 123 | if (invoker.enabled) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 124 | skia_source_set(target_name) { |
| 125 | visibility = [ ":*" ] |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 126 | check_includes = false |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 127 | configs = skia_library_configs |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 128 | forward_variables_from(invoker, "*") |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 129 | if (defined(invoker.configs)) { |
| 130 | configs += invoker.configs |
| 131 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 132 | } |
| 133 | } else { |
| 134 | # If not enabled, a phony empty target that swallows all otherwise unused variables. |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 135 | skia_source_set(target_name) { |
| 136 | visibility = [ ":*" ] |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 137 | check_includes = false |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 138 | forward_variables_from(invoker, |
| 139 | "*", |
| 140 | [ |
| 141 | "sources", |
| 142 | "cflags", |
| 143 | ]) |
| 144 | } |
| 145 | } |
anmittal | a7eaf2e | 2016-08-17 13:57:26 -0700 | [diff] [blame] | 146 | } |
| 147 | |
mtklein | 422310d | 2016-08-16 18:28:43 -0700 | [diff] [blame] | 148 | is_x86 = current_cpu == "x64" || current_cpu == "x86" |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 149 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 150 | opts("none") { |
| 151 | enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 152 | sources = skia_opts.none_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 153 | cflags = [] |
| 154 | } |
| 155 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 156 | opts("armv7") { |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 157 | enabled = current_cpu == "arm" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 158 | sources = skia_opts.armv7_sources + skia_opts.neon_sources |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 159 | cflags = [] |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | opts("arm64") { |
| 163 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 164 | sources = skia_opts.arm64_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 165 | cflags = [] |
| 166 | } |
| 167 | |
| 168 | opts("crc32") { |
| 169 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 170 | sources = skia_opts.crc32_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 171 | cflags = [ "-march=armv8-a+crc" ] |
| 172 | } |
| 173 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 174 | opts("sse2") { |
| 175 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 176 | sources = skia_opts.sse2_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 177 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 178 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ] |
| 179 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 180 | cflags = [ "-msse2" ] |
| 181 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 182 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 183 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 184 | opts("ssse3") { |
| 185 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 186 | sources = skia_opts.ssse3_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 187 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 188 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ] |
| 189 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 190 | cflags = [ "-mssse3" ] |
| 191 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 192 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 193 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 194 | opts("sse41") { |
| 195 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 196 | sources = skia_opts.sse41_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 197 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 198 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ] |
| 199 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 200 | cflags = [ "-msse4.1" ] |
| 201 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 202 | } |
mtklein | 4e97607 | 2016-08-08 09:06:27 -0700 | [diff] [blame] | 203 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 204 | opts("sse42") { |
| 205 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 206 | sources = skia_opts.sse42_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 207 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 208 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ] |
| 209 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 210 | cflags = [ "-msse4.2" ] |
| 211 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | opts("avx") { |
| 215 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 216 | sources = skia_opts.avx_sources |
Mike Klein | 4d4b3aa | 2018-03-21 13:07:35 -0400 | [diff] [blame] | 217 | if (is_win) { |
Mike Klein | 17b6e48 | 2016-11-18 22:11:41 +0000 | [diff] [blame] | 218 | cflags = [ "/arch:AVX" ] |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 219 | } else { |
| 220 | cflags = [ "-mavx" ] |
Mike Klein | 1cc767b | 2019-12-13 13:02:22 -0500 | [diff] [blame] | 221 | if (is_mac && is_debug) { |
Mike Klein | f800c1d | 2020-06-04 11:53:56 -0500 | [diff] [blame] | 222 | cflags += [ "-fno-stack-check" ] # Work around skia:9709 |
Mike Klein | 1cc767b | 2019-12-13 13:02:22 -0500 | [diff] [blame] | 223 | } |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 224 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 225 | } |
| 226 | |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 227 | opts("hsw") { |
| 228 | enabled = is_x86 |
| 229 | sources = skia_opts.hsw_sources |
Mike Klein | 4d4b3aa | 2018-03-21 13:07:35 -0400 | [diff] [blame] | 230 | if (is_win) { |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 231 | cflags = [ "/arch:AVX2" ] |
| 232 | } else { |
Mike Klein | e87c486 | 2018-03-23 00:13:58 +0000 | [diff] [blame] | 233 | cflags = [ "-march=haswell" ] |
Mike Klein | db38022 | 2020-01-22 13:53:18 -0600 | [diff] [blame] | 234 | if (is_mac && is_debug) { |
Mike Klein | f800c1d | 2020-06-04 11:53:56 -0500 | [diff] [blame] | 235 | cflags += [ "-fno-stack-check" ] # Work around skia:9709 |
Mike Klein | db38022 | 2020-01-22 13:53:18 -0600 | [diff] [blame] | 236 | } |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 237 | } |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 238 | } |
| 239 | |
Mike Klein | ad56c4c | 2020-06-05 06:57:30 -0500 | [diff] [blame] | 240 | opts("skx") { |
| 241 | enabled = is_x86 |
| 242 | sources = skia_opts.skx_sources |
| 243 | if (is_win) { |
| 244 | cflags = [ "/arch:AVX512" ] |
| 245 | } else { |
| 246 | cflags = [ "-march=skylake-avx512" ] |
| 247 | if (is_mac && is_debug) { |
| 248 | cflags += [ "-fno-stack-check" ] # Work around skia:9709 |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 253 | # Any feature of Skia that requires third-party code should be optional and use this template. |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 254 | template("optional") { |
| 255 | if (invoker.enabled) { |
| 256 | config(target_name + "_public") { |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 257 | if (defined(invoker.public_defines)) { |
| 258 | defines = invoker.public_defines |
| 259 | } |
Chris Dalton | 3a67b8e | 2018-05-03 09:30:29 -0600 | [diff] [blame] | 260 | if (defined(invoker.public_configs)) { |
| 261 | configs = invoker.public_configs |
| 262 | } |
Hal Canary | 2dad990 | 2019-11-20 16:01:31 -0500 | [diff] [blame] | 263 | if (defined(invoker.public_include_dirs)) { |
| 264 | include_dirs = invoker.public_include_dirs |
| 265 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 266 | } |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 267 | skia_source_set(target_name) { |
| 268 | visibility = [ ":*" ] |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 269 | check_includes = false |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 270 | configs = skia_library_configs |
| 271 | |
| 272 | # "*" clobbers the current scope; append to existing configs |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 273 | forward_variables_from(invoker, |
| 274 | "*", |
| 275 | [ |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 276 | "configs", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 277 | "public_defines", |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 278 | "sources_for_tests", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 279 | "sources_when_disabled", |
| 280 | ]) |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 281 | if (defined(invoker.configs)) { |
| 282 | configs += invoker.configs |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 283 | } |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 284 | all_dependent_configs = [ ":" + target_name + "_public" ] |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 285 | } |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 286 | if (defined(invoker.sources_for_tests) && skia_enable_tools) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 287 | skia_source_set(target_name + "_tests") { |
| 288 | visibility = [ ":*" ] |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 289 | check_includes = false |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 290 | configs = skia_library_configs |
| 291 | |
| 292 | # "*" clobbers the current scope; append to existing configs |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 293 | forward_variables_from(invoker, |
| 294 | "*", |
| 295 | [ |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 296 | "configs", |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 297 | "public_defines", |
| 298 | "sources", |
| 299 | "sources_for_tests", |
| 300 | "sources_when_disabled", |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 301 | ]) |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 302 | if (defined(invoker.configs)) { |
| 303 | configs += invoker.configs |
| 304 | } |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 305 | testonly = true |
| 306 | sources = invoker.sources_for_tests |
| 307 | if (!defined(deps)) { |
| 308 | deps = [] |
| 309 | } |
| 310 | deps += [ ":test" ] |
| 311 | all_dependent_configs = [ ":" + target_name + "_public" ] |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 312 | } |
| 313 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 314 | } else { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 315 | skia_source_set(target_name) { |
| 316 | visibility = [ ":*" ] |
| 317 | configs = skia_library_configs |
| 318 | |
| 319 | # "*" clobbers the current scope; append to existing configs |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 320 | forward_variables_from(invoker, |
| 321 | "*", |
| 322 | [ |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 323 | "configs", |
Ben Wagner | ea765a3 | 2020-06-05 13:42:30 -0400 | [diff] [blame] | 324 | "public", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 325 | "public_defines", |
Greg Daniel | 91dfa3b | 2018-05-22 13:25:15 -0400 | [diff] [blame] | 326 | "public_deps", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 327 | "deps", |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 328 | "libs", |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 329 | "frameworks", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 330 | "sources", |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 331 | "sources_for_tests", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 332 | "sources_when_disabled", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 333 | ]) |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 334 | if (defined(invoker.configs)) { |
| 335 | configs += invoker.configs |
| 336 | } |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 337 | if (defined(invoker.sources_when_disabled)) { |
| 338 | sources = invoker.sources_when_disabled |
| 339 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 340 | } |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 341 | if (defined(invoker.sources_for_tests)) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 342 | skia_source_set(target_name + "_tests") { |
| 343 | visibility = [ ":*" ] |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 344 | } |
| 345 | } |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 346 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 347 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 348 | |
Leon Scroggins III | 63cfb36 | 2020-04-24 13:00:48 -0400 | [diff] [blame] | 349 | optional("android_utils") { |
| 350 | enabled = skia_enable_android_utils |
| 351 | |
Leon Scroggins III | 87caae6 | 2020-05-04 10:02:45 -0400 | [diff] [blame] | 352 | public = [ |
| 353 | "client_utils/android/BRDAllocator.h", |
| 354 | "client_utils/android/BitmapRegionDecoder.h", |
| 355 | "client_utils/android/FrontBufferedStream.h", |
| 356 | ] |
Leon Scroggins III | 63cfb36 | 2020-04-24 13:00:48 -0400 | [diff] [blame] | 357 | public_defines = [ "SK_ENABLE_ANDROID_UTILS" ] |
Leon Scroggins III | 87caae6 | 2020-05-04 10:02:45 -0400 | [diff] [blame] | 358 | sources = [ |
| 359 | "client_utils/android/BitmapRegionDecoder.cpp", |
| 360 | "client_utils/android/FrontBufferedStream.cpp", |
| 361 | ] |
Leon Scroggins III | 63cfb36 | 2020-04-24 13:00:48 -0400 | [diff] [blame] | 362 | } |
| 363 | |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 364 | group("fontmgr_factory") { |
| 365 | public_deps = [ skia_fontmgr_factory ] |
| 366 | } |
| 367 | |
| 368 | optional("fontmgr_empty_factory") { |
| 369 | enabled = true |
| 370 | sources = [ "src/ports/SkFontMgr_empty_factory.cpp" ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 371 | } |
| 372 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 373 | optional("fontmgr_android") { |
Leon Scroggins III | be85c19 | 2018-11-13 13:50:12 -0500 | [diff] [blame] | 374 | enabled = skia_enable_fontmgr_android |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 375 | |
| 376 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 377 | ":typeface_freetype", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 378 | "//third_party/expat", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 379 | ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 380 | public = [ "include/ports/SkFontMgr_android.h" ] |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 381 | sources = [ |
| 382 | "src/ports/SkFontMgr_android.cpp", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 383 | "src/ports/SkFontMgr_android_parser.cpp", |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 384 | "src/ports/SkFontMgr_android_parser.h", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 385 | ] |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 386 | sources_for_tests = [ "tests/FontMgrAndroidParserTest.cpp" ] |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 387 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 388 | optional("fontmgr_android_factory") { |
| 389 | enabled = skia_enable_fontmgr_android |
| 390 | deps = [ ":fontmgr_android" ] |
| 391 | sources = [ "src/ports/SkFontMgr_android_factory.cpp" ] |
| 392 | } |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 393 | |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 394 | optional("fontmgr_custom") { |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 395 | enabled = |
| 396 | skia_enable_fontmgr_custom_directory || |
| 397 | skia_enable_fontmgr_custom_embedded || skia_enable_fontmgr_custom_empty |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 398 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 399 | deps = [ ":typeface_freetype" ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 400 | public = [ "src/ports/SkFontMgr_custom.h" ] |
| 401 | sources = [ "src/ports/SkFontMgr_custom.cpp" ] |
| 402 | } |
| 403 | |
| 404 | optional("fontmgr_custom_directory") { |
| 405 | enabled = skia_enable_fontmgr_custom_directory |
| 406 | |
| 407 | deps = [ |
| 408 | ":fontmgr_custom", |
| 409 | ":typeface_freetype", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 410 | ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 411 | public = [ "include/ports/SkFontMgr_directory.h" ] |
| 412 | sources = [ "src/ports/SkFontMgr_custom_directory.cpp" ] |
| 413 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 414 | optional("fontmgr_custom_directory_factory") { |
| 415 | enabled = skia_enable_fontmgr_custom_directory |
| 416 | deps = [ ":fontmgr_custom_directory" ] |
| 417 | sources = [ "src/ports/SkFontMgr_custom_directory_factory.cpp" ] |
| 418 | } |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 419 | |
| 420 | optional("fontmgr_custom_embedded") { |
| 421 | enabled = skia_enable_fontmgr_custom_embedded |
| 422 | |
| 423 | deps = [ |
| 424 | ":fontmgr_custom", |
| 425 | ":typeface_freetype", |
| 426 | ] |
| 427 | sources = [ "src/ports/SkFontMgr_custom_embedded.cpp" ] |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 428 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 429 | optional("fontmgr_custom_embedded_factory") { |
| 430 | enabled = skia_enable_fontmgr_custom_embedded |
| 431 | deps = [ ":fontmgr_custom_embedded" ] |
| 432 | sources = [ "src/ports/SkFontMgr_custom_embedded_factory.cpp" ] |
| 433 | } |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 434 | |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 435 | optional("fontmgr_custom_empty") { |
| 436 | enabled = skia_enable_fontmgr_custom_empty |
Kevin Lubick | ddd0a33 | 2018-12-12 10:35:13 -0500 | [diff] [blame] | 437 | |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 438 | deps = [ |
| 439 | ":fontmgr_custom", |
| 440 | ":typeface_freetype", |
Sergey Ulanov | f3babcd | 2018-11-30 17:42:00 -0800 | [diff] [blame] | 441 | ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 442 | public = [ "include/ports/SkFontMgr_empty.h" ] |
| 443 | sources = [ "src/ports/SkFontMgr_custom_empty.cpp" ] |
Hal Canary | ff2742e | 2018-01-30 11:35:47 -0500 | [diff] [blame] | 444 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 445 | optional("fontmgr_custom_empty_factory") { |
| 446 | enabled = skia_enable_fontmgr_custom_empty |
| 447 | deps = [ ":fontmgr_custom_empty" ] |
| 448 | sources = [ "src/ports/SkFontMgr_custom_empty_factory.cpp" ] |
| 449 | } |
Hal Canary | ff2742e | 2018-01-30 11:35:47 -0500 | [diff] [blame] | 450 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 451 | optional("fontmgr_fontconfig") { |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 452 | enabled = skia_enable_fontmgr_fontconfig |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 453 | |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 454 | # The public header includes fontconfig.h and uses FcConfig* |
| 455 | public_deps = [ "//third_party:fontconfig" ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 456 | public = [ "include/ports/SkFontMgr_fontconfig.h" ] |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 457 | deps = [ ":typeface_freetype" ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 458 | sources = [ "src/ports/SkFontMgr_fontconfig.cpp" ] |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 459 | sources_for_tests = [ "tests/FontMgrFontConfigTest.cpp" ] |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 460 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 461 | optional("fontmgr_fontconfig_factory") { |
| 462 | enabled = skia_enable_fontmgr_fontconfig |
| 463 | deps = [ ":fontmgr_fontconfig" ] |
| 464 | sources = [ "src/ports/SkFontMgr_fontconfig_factory.cpp" ] |
| 465 | } |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 466 | |
| 467 | optional("fontmgr_FontConfigInterface") { |
| 468 | enabled = skia_enable_fontmgr_FontConfigInterface |
| 469 | |
| 470 | deps = [ |
| 471 | ":typeface_freetype", |
| 472 | "//third_party:fontconfig", |
| 473 | ] |
| 474 | public = [ |
| 475 | "include/ports/SkFontConfigInterface.h", |
| 476 | "include/ports/SkFontMgr_FontConfigInterface.h", |
| 477 | ] |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 478 | sources = [ |
bungeman | 1ae0e01 | 2016-09-19 12:13:16 -0700 | [diff] [blame] | 479 | "src/ports/SkFontConfigInterface.cpp", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 480 | "src/ports/SkFontConfigInterface_direct.cpp", |
| 481 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 482 | "src/ports/SkFontConfigTypeface.h", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 483 | "src/ports/SkFontMgr_FontConfigInterface.cpp", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 484 | ] |
| 485 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 486 | optional("fontmgr_FontConfigInterface_factory") { |
| 487 | enabled = skia_enable_fontmgr_FontConfigInterface |
| 488 | deps = [ ":fontmgr_FontConfigInterface" ] |
| 489 | sources = [ "src/ports/SkFontMgr_FontConfigInterface_factory.cpp" ] |
| 490 | } |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 491 | |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 492 | optional("fontmgr_fuchsia") { |
| 493 | enabled = skia_enable_fontmgr_fuchsia |
| 494 | |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 495 | deps = [] |
| 496 | |
| 497 | if (is_fuchsia && using_fuchsia_sdk) { |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 498 | deps += [ "//build/fuchsia/fidl:fuchsia.fonts" ] |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 499 | } else { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 500 | deps = [ "//sdk/fidl/fuchsia.fonts" ] |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 501 | } |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 502 | public = [ "src/ports/SkFontMgr_fuchsia.h" ] |
| 503 | sources = [ "src/ports/SkFontMgr_fuchsia.cpp" ] |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 504 | } |
| 505 | |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 506 | optional("fontmgr_mac_ct") { |
Ben Wagner | d13487e | 2020-06-03 23:29:43 -0400 | [diff] [blame] | 507 | enabled = skia_use_fonthost_mac |
| 508 | |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 509 | public = [ |
| 510 | "include/ports/SkFontMgr_mac_ct.h", |
| 511 | "include/ports/SkTypeface_mac.h", |
| 512 | ] |
Ben Wagner | 0ef90dd | 2020-06-05 11:25:42 -0400 | [diff] [blame] | 513 | sources = [ |
Ben Wagner | 0ef90dd | 2020-06-05 11:25:42 -0400 | [diff] [blame] | 514 | "src/ports/SkFontMgr_mac_ct.cpp", |
Ben Wagner | 0ef90dd | 2020-06-05 11:25:42 -0400 | [diff] [blame] | 515 | "src/ports/SkScalerContext_mac_ct.cpp", |
| 516 | "src/ports/SkScalerContext_mac_ct.h", |
| 517 | "src/ports/SkTypeface_mac_ct.cpp", |
| 518 | "src/ports/SkTypeface_mac_ct.h", |
| 519 | ] |
Ben Wagner | a3e5e55 | 2021-02-22 15:37:33 +0000 | [diff] [blame] | 520 | sources_for_tests = [ "tests/TypefaceMacTest.cpp" ] |
Ben Wagner | d13487e | 2020-06-03 23:29:43 -0400 | [diff] [blame] | 521 | |
| 522 | if (is_mac) { |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 523 | frameworks = [ |
Ben Wagner | d13487e | 2020-06-03 23:29:43 -0400 | [diff] [blame] | 524 | # AppKit symbols NSFontWeightXXX may be dlsym'ed. |
| 525 | "AppKit.framework", |
| 526 | "ApplicationServices.framework", |
| 527 | ] |
| 528 | } |
| 529 | |
| 530 | if (is_ios) { |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 531 | frameworks = [ |
Ben Wagner | d13487e | 2020-06-03 23:29:43 -0400 | [diff] [blame] | 532 | "CoreFoundation.framework", |
| 533 | "CoreGraphics.framework", |
| 534 | "CoreText.framework", |
| 535 | |
| 536 | # UIKit symbols UIFontWeightXXX may be dlsym'ed. |
| 537 | "UIKit.framework", |
| 538 | ] |
| 539 | } |
| 540 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 541 | optional("fontmgr_mac_ct_factory") { |
| 542 | enabled = skia_use_fonthost_mac |
| 543 | deps = [ ":fontmgr_mac_ct" ] |
| 544 | sources = [ "src/ports/SkFontMgr_mac_ct_factory.cpp" ] |
| 545 | } |
Ben Wagner | d13487e | 2020-06-03 23:29:43 -0400 | [diff] [blame] | 546 | |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 547 | optional("fontmgr_win") { |
| 548 | enabled = skia_enable_fontmgr_win |
| 549 | |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 550 | public = [ "include/ports/SkTypeface_win.h" ] |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 551 | sources = [ |
| 552 | "src/fonts/SkFontMgr_indirect.cpp", |
| 553 | "src/ports/SkFontMgr_win_dw.cpp", |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 554 | "src/ports/SkScalerContext_win_dw.cpp", |
| 555 | "src/ports/SkTypeface_win_dw.cpp", |
| 556 | ] |
| 557 | } |
Ben Wagner | 8c3daeb | 2020-06-29 11:59:10 -0400 | [diff] [blame] | 558 | optional("fontmgr_win_factory") { |
| 559 | enabled = skia_enable_fontmgr_win |
| 560 | deps = [ ":fontmgr_win" ] |
| 561 | sources = [ "src/ports/SkFontMgr_win_dw_factory.cpp" ] |
| 562 | } |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 563 | |
| 564 | optional("fontmgr_win_gdi") { |
| 565 | enabled = skia_enable_fontmgr_win_gdi |
| 566 | |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 567 | public = [ "include/ports/SkTypeface_win.h" ] |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 568 | sources = [ "src/ports/SkFontHost_win.cpp" ] |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 569 | libs = [ "Gdi32.lib" ] |
| 570 | } |
| 571 | |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 572 | if (skia_lex) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 573 | skia_executable("sksllex") { |
Ethan Nicholas | ca82a92 | 2017-09-07 09:39:50 -0400 | [diff] [blame] | 574 | sources = [ |
| 575 | "src/sksl/lex/Main.cpp", |
| 576 | "src/sksl/lex/NFA.cpp", |
| 577 | "src/sksl/lex/RegexNode.cpp", |
| 578 | "src/sksl/lex/RegexParser.cpp", |
| 579 | ] |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 580 | include_dirs = [ "." ] |
Ethan Nicholas | ca82a92 | 2017-09-07 09:39:50 -0400 | [diff] [blame] | 581 | } |
| 582 | |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 583 | action("run_sksllex") { |
| 584 | script = "gn/run_sksllex.py" |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 585 | deps = [ ":sksllex(//gn/toolchain:$host_toolchain)" ] |
| 586 | sources = [ "src/sksl/lex/sksl.lex" ] |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 587 | |
| 588 | # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a |
| 589 | # path that starts with target_out_dir and then uses ".." to back up into the src dir. |
| 590 | outputs = [ |
Brian Osman | 1e7d8aa | 2021-02-18 14:37:29 -0500 | [diff] [blame] | 591 | "$target_out_dir/" + rebase_path("src/sksl/SkSLLexer.h", target_out_dir), |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 592 | # the script also modifies the corresponding .cpp file, but if we tell GN that it gets |
| 593 | # confused due to the same file being named by two different paths |
| 594 | ] |
| 595 | sksllex_path = "$root_out_dir/" |
| 596 | sksllex_path += "sksllex" |
| 597 | if (host_os == "win") { |
| 598 | sksllex_path += ".exe" |
| 599 | } |
| 600 | args = [ |
| 601 | rebase_path(sksllex_path), |
| 602 | rebase_path("bin/clang-format"), |
John Stiles | 796e702 | 2020-06-11 19:57:22 -0400 | [diff] [blame] | 603 | rebase_path("bin/fetch-clang-format"), |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 604 | rebase_path("src"), |
| 605 | ] |
| 606 | } |
| 607 | } else { |
| 608 | group("run_sksllex") { |
| 609 | } |
| 610 | } |
| 611 | |
Brian Osman | ed5181e | 2021-07-01 13:54:20 -0400 | [diff] [blame] | 612 | # `Compile SkSL Tests` relies on skslc. |
| 613 | if (skia_compile_sksl_tests) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 614 | skia_executable("skslc") { |
Brian Osman | 8d09d4a | 2020-11-24 15:51:06 -0500 | [diff] [blame] | 615 | defines = [ |
| 616 | "SKSL_STANDALONE", |
Brian Osman | d010f65 | 2021-02-24 13:59:39 -0500 | [diff] [blame] | 617 | "SK_DISABLE_TRACING", |
Brian Osman | 8d09d4a | 2020-11-24 15:51:06 -0500 | [diff] [blame] | 618 | "SK_ENABLE_SPIRV_VALIDATION", |
| 619 | ] |
Brian Osman | a6ca975 | 2020-10-02 13:41:21 -0400 | [diff] [blame] | 620 | sources = [ |
Michael Ludwig | c1ed11d | 2021-08-24 11:49:55 -0400 | [diff] [blame] | 621 | "src/core/SkBlockAllocator.cpp", |
Brian Osman | 47726a1 | 2020-12-17 16:02:08 -0500 | [diff] [blame] | 622 | "src/core/SkCpu.cpp", |
| 623 | "src/core/SkData.cpp", |
| 624 | "src/core/SkHalf.cpp", |
Brian Osman | a6ca975 | 2020-10-02 13:41:21 -0400 | [diff] [blame] | 625 | "src/core/SkMalloc.cpp", |
| 626 | "src/core/SkMath.cpp", |
John Stiles | fbd9fae | 2021-06-22 09:34:14 -0400 | [diff] [blame] | 627 | "src/core/SkMatrixInvert.cpp", |
John Stiles | 060503e | 2020-10-22 15:02:26 -0400 | [diff] [blame] | 628 | "src/core/SkSemaphore.cpp", |
Brian Osman | 47726a1 | 2020-12-17 16:02:08 -0500 | [diff] [blame] | 629 | "src/core/SkStream.cpp", |
| 630 | "src/core/SkString.cpp", |
Brian Osman | e9ad19b | 2020-12-23 13:31:13 -0500 | [diff] [blame] | 631 | "src/core/SkStringUtils.cpp", |
Ethan Nicholas | d2e0960 | 2021-06-10 11:21:59 -0400 | [diff] [blame] | 632 | "src/core/SkStringView.cpp", |
John Stiles | 060503e | 2020-10-22 15:02:26 -0400 | [diff] [blame] | 633 | "src/core/SkThreadID.cpp", |
Brian Osman | 47726a1 | 2020-12-17 16:02:08 -0500 | [diff] [blame] | 634 | "src/core/SkUtils.cpp", |
| 635 | "src/core/SkVM.cpp", |
John Stiles | 23e6866 | 2020-10-29 10:17:15 -0400 | [diff] [blame] | 636 | "src/gpu/GrMemoryPool.cpp", |
Brian Osman | 62b039b | 2021-02-08 13:49:53 -0500 | [diff] [blame] | 637 | "src/gpu/GrShaderUtils.cpp", |
Brian Osman | a6ca975 | 2020-10-02 13:41:21 -0400 | [diff] [blame] | 638 | "src/ports/SkMemory_malloc.cpp", |
Brian Osman | 47726a1 | 2020-12-17 16:02:08 -0500 | [diff] [blame] | 639 | "src/ports/SkOSFile_stdio.cpp", |
Brian Osman | a6ca975 | 2020-10-02 13:41:21 -0400 | [diff] [blame] | 640 | "src/sksl/SkSLMain.cpp", |
Brian Osman | 47726a1 | 2020-12-17 16:02:08 -0500 | [diff] [blame] | 641 | "src/utils/SkUTF.cpp", |
Brian Osman | a6ca975 | 2020-10-02 13:41:21 -0400 | [diff] [blame] | 642 | ] |
Brian Osman | 47726a1 | 2020-12-17 16:02:08 -0500 | [diff] [blame] | 643 | if (is_win) { |
| 644 | sources += [ "src/ports/SkOSFile_win.cpp" ] |
| 645 | } else { |
| 646 | sources += [ "src/ports/SkOSFile_posix.cpp" ] |
| 647 | } |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 648 | sources += skia_sksl_sources |
Brian Osman | fb32ddf | 2019-06-18 10:14:20 -0400 | [diff] [blame] | 649 | sources += skia_sksl_gpu_sources |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 650 | include_dirs = [ "." ] |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 651 | deps = [ |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 652 | ":run_sksllex", |
Corentin Wallez | 89d6e79 | 2021-03-08 15:25:34 +0100 | [diff] [blame] | 653 | "//third_party/externals/spirv-tools:spvtools", |
| 654 | "//third_party/externals/spirv-tools:spvtools_val", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 655 | ] |
| 656 | } |
| 657 | |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 658 | skslc_path = "$root_out_dir/" |
| 659 | if (host_toolchain != default_toolchain_name) { |
| 660 | skslc_path += "$host_toolchain/" |
| 661 | } |
| 662 | skslc_path += "skslc" |
| 663 | if (host_os == "win") { |
| 664 | skslc_path += ".exe" |
| 665 | } |
| 666 | |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 667 | copy("sksl_pre_includes") { |
| 668 | sources = [ |
| 669 | "src/sksl/sksl_frag.sksl", |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 670 | "src/sksl/sksl_gpu.sksl", |
Brian Osman | b06301e | 2020-11-06 11:45:36 -0500 | [diff] [blame] | 671 | "src/sksl/sksl_public.sksl", |
Brian Osman | cbb60bd | 2021-04-12 09:49:20 -0400 | [diff] [blame] | 672 | "src/sksl/sksl_rt_shader.sksl", |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 673 | "src/sksl/sksl_vert.sksl", |
| 674 | ] |
| 675 | outputs = [ "$root_out_dir/{{source_file_part}}" ] |
| 676 | } |
| 677 | |
| 678 | dehydrate_sksl_sources = get_target_outputs(":sksl_pre_includes") |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 679 | |
| 680 | dehydrate_sksl_outputs = [] |
| 681 | foreach(src, dehydrate_sksl_sources) { |
| 682 | name = get_path_info(src, "name") |
| 683 | |
| 684 | # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a |
| 685 | # path that starts with target_out_dir and then uses ".." to back up into the src dir. |
| 686 | dehydrate_sksl_outputs += [ "$target_out_dir/" + rebase_path( |
| 687 | "src/sksl/generated/$name.dehydrated.sksl", |
| 688 | target_out_dir) ] |
| 689 | } |
| 690 | |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 691 | action("dehydrate_sksl") { |
| 692 | script = "gn/dehydrate_sksl.py" |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 693 | deps = [ |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 694 | ":sksl_pre_includes", |
| 695 | ":skslc(//gn/toolchain:$host_toolchain)", |
| 696 | ] |
| 697 | sources = dehydrate_sksl_sources |
| 698 | outputs = dehydrate_sksl_outputs |
Brian Osman | a578138 | 2020-08-07 21:28:12 +0000 | [diff] [blame] | 699 | args = [ |
| 700 | rebase_path(skslc_path), |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 701 | rebase_path("src/sksl/generated"), |
Brian Osman | a578138 | 2020-08-07 21:28:12 +0000 | [diff] [blame] | 702 | ] |
Brian Osman | dd49617 | 2020-08-08 08:17:18 -0400 | [diff] [blame] | 703 | args += rebase_path(dehydrate_sksl_sources) |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 704 | } |
John Stiles | d836f84 | 2020-09-14 10:21:44 -0400 | [diff] [blame] | 705 | } else { |
| 706 | group("dehydrate_sksl") { |
| 707 | } |
| 708 | } |
| 709 | |
John Stiles | d836f84 | 2020-09-14 10:21:44 -0400 | [diff] [blame] | 710 | if (skia_compile_sksl_tests) { |
| 711 | import("gn/sksl_tests.gni") |
John Stiles | d836f84 | 2020-09-14 10:21:44 -0400 | [diff] [blame] | 712 | |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 713 | template("compile_sksl") { |
| 714 | # Compile the passed-in `sources` into `outputs` using skslc, with the given language/settings. |
| 715 | action("compile_sksl_${target_name}") { |
| 716 | script = "gn/compile_sksl_tests.py" |
| 717 | deps = [ |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 718 | ":sksl_pre_includes", |
| 719 | ":skslc(//gn/toolchain:$host_toolchain)", |
| 720 | ] |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 721 | sources = [] |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 722 | outputs = [] |
John Stiles | b7f5e1b | 2021-01-27 14:05:15 -0500 | [diff] [blame] | 723 | response_file_contents = [] |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 724 | args = [ |
| 725 | rebase_path(skslc_path), |
| 726 | invoker.lang, |
| 727 | invoker.settings, |
John Stiles | b7f5e1b | 2021-01-27 14:05:15 -0500 | [diff] [blame] | 728 | "{{response_file_name}}", |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 729 | ] |
| 730 | |
John Stiles | bfc9be0 | 2021-01-22 11:55:48 -0500 | [diff] [blame] | 731 | testsDir = get_path_info("tests", "abspath") |
| 732 | resourcesDir = get_path_info("resources", "abspath") |
| 733 | |
| 734 | foreach(partialPath, invoker.sources) { |
| 735 | dst = testsDir + partialPath |
| 736 | src = resourcesDir + partialPath |
| 737 | |
| 738 | dir = get_path_info(dst, "dir") |
John Stiles | 0a0a50a | 2021-04-14 09:35:24 -0400 | [diff] [blame] | 739 | |
| 740 | # We want to support double-extensions (for '.dsl.cpp') but GN doesn't natively handle this. |
| 741 | # Workaround: http://go/ggroup/a/chromium.org/g/gn-dev/c/RdEpjeYtb-4 |
| 742 | # For input path "file.aa.bb", name will contain "file" and ext will contain ".aa.bb". |
| 743 | # For input path "file.cc", name will contain "file" and ext will contain ".cc". |
| 744 | nameTmp = get_path_info(dst, "name") |
| 745 | name = get_path_info(nameTmp, "name") |
| 746 | ext = get_path_info(nameTmp, "extension") |
| 747 | ext += get_path_info(dst, "extension") |
John Stiles | b7f5e1b | 2021-01-27 14:05:15 -0500 | [diff] [blame] | 748 | response_file_contents += rebase_path([ |
| 749 | src, |
| 750 | dir, |
| 751 | ]) |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 752 | sources += [ src ] |
John Stiles | c301218 | 2020-12-08 15:07:00 -0500 | [diff] [blame] | 753 | |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 754 | foreach(outExtension, invoker.outExtensions) { |
Brian Osman | 99ddd2a | 2021-08-27 11:21:12 -0400 | [diff] [blame] | 755 | # SPIR-V uses separate extensions for .vert shaders. |
John Stiles | 82ab340 | 2021-04-13 17:13:03 -0400 | [diff] [blame] | 756 | if (ext == "vert" && outExtension == ".asm.frag") { |
John Stiles | c301218 | 2020-12-08 15:07:00 -0500 | [diff] [blame] | 757 | outExtension = ".asm.vert" |
John Stiles | c301218 | 2020-12-08 15:07:00 -0500 | [diff] [blame] | 758 | } |
John Stiles | bfc9be0 | 2021-01-22 11:55:48 -0500 | [diff] [blame] | 759 | outputs += |
| 760 | [ target_out_dir + "/" + |
| 761 | rebase_path(dir + "/" + name + outExtension, target_out_dir) ] |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 762 | } |
| 763 | } |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 764 | } |
John Stiles | d836f84 | 2020-09-14 10:21:44 -0400 | [diff] [blame] | 765 | } |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 766 | compile_sksl("glsl_tests") { |
| 767 | sources = sksl_glsl_tests_sources + sksl_glsl_settings_tests_sources |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 768 | outExtensions = [ ".glsl" ] |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 769 | lang = "--glsl" |
| 770 | settings = "--settings" |
John Stiles | 0ed9f31 | 2020-09-16 17:46:37 -0400 | [diff] [blame] | 771 | } |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 772 | compile_sksl("glsl_nosettings_tests") { |
John Stiles | 0ed9f31 | 2020-09-16 17:46:37 -0400 | [diff] [blame] | 773 | sources = sksl_glsl_settings_tests_sources |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 774 | outExtensions = [ "StandaloneSettings.glsl" ] |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 775 | lang = "--glsl" |
| 776 | settings = "--nosettings" |
John Stiles | d836f84 | 2020-09-14 10:21:44 -0400 | [diff] [blame] | 777 | } |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 778 | compile_sksl("metal_tests") { |
| 779 | sources = sksl_metal_tests_sources |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 780 | outExtensions = [ ".metal" ] |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 781 | lang = "--metal" |
| 782 | settings = "--settings" |
| 783 | } |
Brian Osman | 977feec | 2020-12-22 11:28:59 -0500 | [diff] [blame] | 784 | compile_sksl("skvm_tests") { |
| 785 | sources = sksl_skvm_tests_sources |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 786 | outExtensions = [ ".skvm" ] |
Brian Osman | 977feec | 2020-12-22 11:28:59 -0500 | [diff] [blame] | 787 | lang = "--skvm" |
| 788 | settings = "--settings" |
| 789 | } |
Brian Osman | 62b039b | 2021-02-08 13:49:53 -0500 | [diff] [blame] | 790 | compile_sksl("stage_tests") { |
| 791 | sources = sksl_stage_tests_sources |
| 792 | outExtensions = [ ".stage" ] |
| 793 | lang = "--stage" |
| 794 | settings = "--settings" |
| 795 | } |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 796 | compile_sksl("spirv_tests") { |
| 797 | sources = sksl_spirv_tests_sources |
John Stiles | da57fc0 | 2021-01-22 11:54:30 -0500 | [diff] [blame] | 798 | outExtensions = [ ".asm.frag" ] |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 799 | lang = "--spirv" |
| 800 | settings = "--settings" |
| 801 | } |
John Stiles | d836f84 | 2020-09-14 10:21:44 -0400 | [diff] [blame] | 802 | } else { |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 803 | group("compile_sksl_glsl_tests") { |
| 804 | } |
| 805 | group("compile_sksl_glsl_nosettings_tests") { |
John Stiles | 0ed9f31 | 2020-09-16 17:46:37 -0400 | [diff] [blame] | 806 | } |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 807 | group("compile_sksl_metal_tests") { |
| 808 | } |
Brian Osman | 977feec | 2020-12-22 11:28:59 -0500 | [diff] [blame] | 809 | group("compile_sksl_skvm_tests") { |
| 810 | } |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 811 | group("compile_sksl_spirv_tests") { |
| 812 | } |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 813 | } |
| 814 | |
Ben Wagner | e27ee6c | 2019-02-15 14:59:30 -0500 | [diff] [blame] | 815 | optional("gpu") { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 816 | enabled = skia_enable_gpu |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 817 | deps = [ |
John Stiles | 7e24871 | 2020-09-24 16:42:09 -0400 | [diff] [blame] | 818 | ":compile_sksl_glsl_nosettings_tests", |
| 819 | ":compile_sksl_glsl_tests", |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 820 | ":compile_sksl_metal_tests", |
Brian Osman | 977feec | 2020-12-22 11:28:59 -0500 | [diff] [blame] | 821 | ":compile_sksl_skvm_tests", |
John Stiles | dda1d31 | 2020-11-20 16:28:50 -0500 | [diff] [blame] | 822 | ":compile_sksl_spirv_tests", |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 823 | ":dehydrate_sksl", |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 824 | ":run_sksllex", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 825 | ] |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 826 | if (skia_generate_workarounds) { |
| 827 | deps += [ ":workaround_list" ] |
| 828 | } |
John Rosasco | a9b348f | 2019-11-08 13:18:15 -0800 | [diff] [blame] | 829 | public_defines = [] |
Chris Dalton | 3a67b8e | 2018-05-03 09:30:29 -0600 | [diff] [blame] | 830 | public_configs = [] |
Greg Daniel | 91dfa3b | 2018-05-22 13:25:15 -0400 | [diff] [blame] | 831 | public_deps = [] |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 832 | |
Brian Osman | ed5181e | 2021-07-01 13:54:20 -0400 | [diff] [blame] | 833 | sources = skia_gpu_sources + skia_sksl_gpu_sources |
Robert Phillips | 024668c | 2021-07-01 12:12:52 -0400 | [diff] [blame] | 834 | if (skia_enable_skgpu_v2) { |
| 835 | sources += skia_skgpu_v2_sources |
Robert Phillips | 3b97aa2 | 2021-05-03 11:42:40 -0400 | [diff] [blame] | 836 | } |
Robert Phillips | 024668c | 2021-07-01 12:12:52 -0400 | [diff] [blame] | 837 | if (!skia_enable_skgpu_v1) { |
| 838 | sources -= skia_skgpu_v1_sources |
Robert Phillips | 7b931f8 | 2021-06-09 14:04:05 -0400 | [diff] [blame] | 839 | } |
Robert Phillips | 3b97aa2 | 2021-05-03 11:42:40 -0400 | [diff] [blame] | 840 | |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 841 | libs = [] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 842 | frameworks = [] |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 843 | |
John Rosasco | a9b348f | 2019-11-08 13:18:15 -0800 | [diff] [blame] | 844 | if (skia_use_gl) { |
| 845 | public_defines += [ "SK_GL" ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 846 | if (is_android) { |
Brian Salomon | be6de9b | 2021-02-18 16:23:41 -0500 | [diff] [blame] | 847 | sources += [ |
| 848 | "src/gpu/gl/egl/GrGLMakeEGLInterface.cpp", |
| 849 | "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp", |
| 850 | ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 851 | |
| 852 | # this lib is required to link against AHardwareBuffer |
| 853 | if (defined(ndk_api) && ndk_api >= 26) { |
| 854 | libs += [ "android" ] |
| 855 | } |
| 856 | } else if (skia_use_egl) { |
Brian Salomon | be6de9b | 2021-02-18 16:23:41 -0500 | [diff] [blame] | 857 | sources += [ |
| 858 | "src/gpu/gl/egl/GrGLMakeEGLInterface.cpp", |
| 859 | "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp", |
| 860 | ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 861 | libs += [ "EGL" ] |
Kevin Lubick | 204c3be | 2020-08-19 14:30:58 -0400 | [diff] [blame] | 862 | } else if (skia_use_webgl) { |
| 863 | sources += [ "src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp" ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 864 | } else if (is_linux && skia_use_x11) { |
Brian Salomon | be6de9b | 2021-02-18 16:23:41 -0500 | [diff] [blame] | 865 | sources += [ |
| 866 | "src/gpu/gl/glx/GrGLMakeGLXInterface.cpp", |
| 867 | "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp", |
| 868 | ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 869 | libs += [ "GL" ] |
| 870 | } else if (is_mac) { |
| 871 | sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ] |
| 872 | } else if (is_ios) { |
| 873 | sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ] |
James Clarke | b8c0dab | 2021-02-09 06:22:41 -0800 | [diff] [blame] | 874 | } else if (is_win && !skia_enable_winuwp) { |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 875 | sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ] |
| 876 | if (target_cpu != "arm64") { |
| 877 | libs += [ "OpenGL32.lib" ] |
| 878 | } |
| 879 | } else { |
| 880 | sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ] |
| 881 | } |
John Rosasco | a9b348f | 2019-11-08 13:18:15 -0800 | [diff] [blame] | 882 | sources += skia_gl_gpu_sources |
| 883 | } |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 884 | |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 885 | if (skia_use_vulkan) { |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 886 | public_defines += [ "SK_VULKAN" ] |
Greg Daniel | b16beb9 | 2020-04-27 14:26:21 +0000 | [diff] [blame] | 887 | if (skia_use_vma) { |
| 888 | deps += [ "third_party/vulkanmemoryallocator" ] |
| 889 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 890 | sources += skia_vk_sources |
egdaniel | e4a9bd7 | 2016-09-21 07:36:14 -0700 | [diff] [blame] | 891 | if (skia_enable_vulkan_debug_layers) { |
| 892 | public_defines += [ "SK_ENABLE_VK_LAYERS" ] |
| 893 | } |
Craig Stout | cb6b4bd | 2018-12-13 10:20:07 -0800 | [diff] [blame] | 894 | if (is_fuchsia) { |
John Rosasco | e57ca49 | 2019-11-13 14:30:45 -0800 | [diff] [blame] | 895 | if (using_fuchsia_sdk) { |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 896 | public_deps += [ "$fuchsia_sdk_root/pkg:vulkan" ] |
| 897 | } else { |
Brian Osman | 489cf88 | 2019-07-09 10:48:28 -0400 | [diff] [blame] | 898 | public_deps += [ "//src/graphics/lib/vulkan" ] |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 899 | } |
Craig Stout | cb6b4bd | 2018-12-13 10:20:07 -0800 | [diff] [blame] | 900 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 901 | } |
Greg Daniel | 91dfa3b | 2018-05-22 13:25:15 -0400 | [diff] [blame] | 902 | |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 903 | if (is_android && (skia_use_gl || skia_use_vulkan)) { |
| 904 | # this lib is required to link against AHardwareBuffer |
| 905 | if (defined(ndk_api) && ndk_api >= 26) { |
| 906 | libs += [ "android" ] |
| 907 | } |
| 908 | } |
| 909 | |
Stephen White | 0d70b71 | 2019-07-10 15:51:30 -0400 | [diff] [blame] | 910 | if (skia_use_dawn) { |
| 911 | public_defines += [ "SK_DAWN" ] |
Stephen White | 985741a | 2019-07-18 11:43:45 -0400 | [diff] [blame] | 912 | sources += skia_dawn_sources |
Zhenyao Mo | 4f17b60 | 2020-04-13 15:26:17 -0700 | [diff] [blame] | 913 | public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ] |
Stephen White | fbffb99 | 2019-10-17 10:32:40 -0400 | [diff] [blame] | 914 | deps += [ |
Zhenyao Mo | 4f17b60 | 2020-04-13 15:26:17 -0700 | [diff] [blame] | 915 | "//third_party/externals/dawn/src/dawn:dawn_proc", |
| 916 | "//third_party/externals/dawn/src/dawn:dawncpp", |
| 917 | "//third_party/externals/dawn/src/dawn_native", |
Stephen White | 0d70b71 | 2019-07-10 15:51:30 -0400 | [diff] [blame] | 918 | ] |
| 919 | if (dawn_enable_d3d12) { |
| 920 | libs += [ |
| 921 | "d3d12.lib", |
| 922 | "dxgi.lib", |
| 923 | "d3dcompiler.lib", |
| 924 | ] |
| 925 | } else if (dawn_enable_metal) { |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 926 | frameworks += [ "Metal.framework" ] |
Stephen White | 0d70b71 | 2019-07-10 15:51:30 -0400 | [diff] [blame] | 927 | } |
| 928 | } |
| 929 | |
Jim Van Verth | b01e12b | 2020-02-18 14:34:38 -0500 | [diff] [blame] | 930 | if (skia_use_direct3d) { |
| 931 | public_defines += [ "SK_DIRECT3D" ] |
Jim Van Verth | 1b89eb7 | 2020-09-23 16:29:51 -0400 | [diff] [blame] | 932 | deps += [ |
| 933 | "//third_party/d3d12allocator", |
| 934 | "//third_party/spirv-cross:spirv_cross", |
| 935 | ] |
Jim Van Verth | b01e12b | 2020-02-18 14:34:38 -0500 | [diff] [blame] | 936 | sources += skia_direct3d_sources |
Jim Van Verth | 03b8ab2 | 2020-02-24 11:36:15 -0500 | [diff] [blame] | 937 | if (skia_enable_direct3d_debug_layer) { |
| 938 | public_defines += [ "SK_ENABLE_D3D_DEBUG_LAYER" ] |
| 939 | } |
Jim Van Verth | b01e12b | 2020-02-18 14:34:38 -0500 | [diff] [blame] | 940 | libs += [ |
| 941 | "d3d12.lib", |
| 942 | "dxgi.lib", |
| 943 | "d3dcompiler.lib", |
| 944 | ] |
| 945 | } |
| 946 | |
Greg Daniel | 6b7e0e2 | 2017-07-12 16:21:09 -0400 | [diff] [blame] | 947 | cflags_objcc = [] |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 948 | if (skia_use_metal) { |
| 949 | public_defines += [ "SK_METAL" ] |
| 950 | sources += skia_metal_sources |
Jim Van Verth | 758d81f | 2021-07-07 12:02:10 -0400 | [diff] [blame] | 951 | if (skia_enable_metal_debug_info) { |
| 952 | public_defines += [ "SK_ENABLE_MTL_DEBUG_INFO" ] |
| 953 | } |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 954 | frameworks += [ "Metal.framework" ] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 955 | frameworks += [ "Foundation.framework" ] |
Jim Van Verth | 36b86af | 2020-08-24 17:16:46 +0000 | [diff] [blame] | 956 | cflags_objcc += [ "-fobjc-arc" ] |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 957 | } |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 958 | |
Kevin Lubick | f4def34 | 2018-10-04 12:52:50 -0400 | [diff] [blame] | 959 | if (is_debug) { |
| 960 | public_defines += [ "SK_ENABLE_DUMP_GPU" ] |
| 961 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 962 | } |
| 963 | |
Leon Scroggins III | 4116920 | 2019-01-29 09:29:57 -0500 | [diff] [blame] | 964 | optional("gif") { |
Hal Canary | 2dad990 | 2019-11-20 16:01:31 -0500 | [diff] [blame] | 965 | enabled = !skia_use_wuffs && skia_use_libgifcodec |
Hal Canary | 1ec9a28 | 2019-11-21 10:15:50 -0500 | [diff] [blame] | 966 | _libgifcodec_gni_path = "third_party/externals/libgifcodec/libgifcodec.gni" |
| 967 | if ("True" == |
| 968 | exec_script("gn/checkpath.py", |
| 969 | [ rebase_path(_libgifcodec_gni_path, root_build_dir) ], |
| 970 | "trim string")) { |
| 971 | public_defines = [ "SK_USE_LIBGIFCODEC" ] |
| 972 | public_include_dirs = [ |
| 973 | ".", |
| 974 | skia_libgifcodec_path, |
| 975 | ] |
| 976 | include_dirs = public_include_dirs |
| 977 | import(_libgifcodec_gni_path) |
| 978 | sources = rebase_path(libgifcodec_sources + libgifcodec_public, |
| 979 | ".", |
| 980 | skia_libgifcodec_path) |
| 981 | } |
Leon Scroggins III | 4116920 | 2019-01-29 09:29:57 -0500 | [diff] [blame] | 982 | } |
| 983 | |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 984 | optional("heif") { |
| 985 | enabled = skia_use_libheif |
| 986 | public_defines = [ "SK_HAS_HEIF_LIBRARY" ] |
| 987 | |
| 988 | deps = [] |
| 989 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 990 | sources = [ "src/codec/SkHeifCodec.cpp" ] |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 991 | } |
| 992 | |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 993 | optional("jpeg_decode") { |
| 994 | enabled = skia_use_libjpeg_turbo_decode |
| 995 | public_defines = [ "SK_CODEC_DECODES_JPEG" ] |
| 996 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 997 | deps = [ "//third_party/libjpeg-turbo:libjpeg" ] |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 998 | sources = [ |
| 999 | "src/codec/SkJpegCodec.cpp", |
| 1000 | "src/codec/SkJpegDecoderMgr.cpp", |
| 1001 | "src/codec/SkJpegUtility.cpp", |
| 1002 | ] |
| 1003 | } |
| 1004 | |
| 1005 | optional("jpeg_encode") { |
| 1006 | enabled = skia_use_libjpeg_turbo_encode |
| 1007 | public_defines = [ "SK_ENCODE_JPEG" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1008 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1009 | deps = [ "//third_party/libjpeg-turbo:libjpeg" ] |
| 1010 | public = [ "include/encode/SkJpegEncoder.h" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1011 | sources = [ |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1012 | "src/images/SkJPEGWriteUtility.cpp", |
Matt Sarett | 04c3731 | 2017-05-05 14:02:13 -0400 | [diff] [blame] | 1013 | "src/images/SkJpegEncoder.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1014 | ] |
| 1015 | } |
| 1016 | |
Leon Scroggins III | 326b989 | 2020-08-05 16:51:10 -0400 | [diff] [blame] | 1017 | optional("ndk_images") { |
| 1018 | enabled = skia_use_ndk_images |
| 1019 | public_defines = [ "SK_ENABLE_NDK_IMAGES" ] |
| 1020 | sources = [ |
| 1021 | "src/ports/SkImageEncoder_NDK.cpp", |
| 1022 | "src/ports/SkImageGeneratorNDK.cpp", |
| 1023 | "src/ports/SkNDKConversions.cpp", |
| 1024 | ] |
Leon Scroggins III | f21d6b9 | 2020-08-05 10:44:17 -0400 | [diff] [blame] | 1025 | libs = [ "jnigraphics" ] |
| 1026 | } |
| 1027 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1028 | optional("pdf") { |
Hal Canary | 43fb7a0 | 2016-12-30 13:09:03 -0500 | [diff] [blame] | 1029 | enabled = skia_use_zlib && skia_enable_pdf |
| 1030 | public_defines = [ "SK_SUPPORT_PDF" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1031 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1032 | deps = [ "//third_party/zlib" ] |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1033 | if (skia_use_libjpeg_turbo_decode) { |
| 1034 | deps += [ ":jpeg_decode" ] |
| 1035 | } |
| 1036 | if (skia_use_libjpeg_turbo_encode) { |
| 1037 | deps += [ ":jpeg_encode" ] |
Hal Canary | 83e0f1b | 2018-04-05 16:58:41 -0400 | [diff] [blame] | 1038 | } |
Robert Phillips | 9b00f1f | 2020-03-24 12:29:44 -0400 | [diff] [blame] | 1039 | public = skia_pdf_public |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 1040 | sources = skia_pdf_sources |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 1041 | sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ] |
Hal Canary | 2a3093c | 2019-02-20 11:25:45 -0500 | [diff] [blame] | 1042 | if (skia_use_icu && skia_use_harfbuzz && skia_pdf_subset_harfbuzz) { |
| 1043 | deps += [ "//third_party/harfbuzz" ] |
| 1044 | defines = [ "SK_PDF_USE_HARFBUZZ_SUBSET" ] |
| 1045 | } else if (skia_use_icu && skia_use_sfntly) { |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1046 | deps += [ "//third_party/sfntly" ] |
Hal Canary | 32498f0 | 2019-02-04 15:36:31 -0500 | [diff] [blame] | 1047 | defines = [ "SK_PDF_USE_SFNTLY" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1048 | } |
| 1049 | } |
| 1050 | |
Robert Phillips | 9b00f1f | 2020-03-24 12:29:44 -0400 | [diff] [blame] | 1051 | optional("xps") { |
| 1052 | enabled = skia_use_xps && is_win |
| 1053 | public_defines = [ "SK_SUPPORT_XPS" ] |
| 1054 | public = skia_xps_public |
| 1055 | sources = skia_xps_sources |
| 1056 | } |
| 1057 | |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1058 | optional("png_decode") { |
| 1059 | enabled = skia_use_libpng_decode |
| 1060 | public_defines = [ "SK_CODEC_DECODES_PNG" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1061 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1062 | deps = [ "//third_party/libpng" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1063 | sources = [ |
| 1064 | "src/codec/SkIcoCodec.cpp", |
| 1065 | "src/codec/SkPngCodec.cpp", |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1066 | ] |
| 1067 | } |
| 1068 | |
| 1069 | optional("png_encode") { |
| 1070 | enabled = skia_use_libpng_encode |
| 1071 | public_defines = [ "SK_ENCODE_PNG" ] |
| 1072 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1073 | deps = [ "//third_party/libpng" ] |
| 1074 | sources = [ "src/images/SkPngEncoder.cpp" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1075 | } |
| 1076 | |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 1077 | optional("raw") { |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1078 | enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo_decode && skia_use_piex |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 1079 | public_defines = [ "SK_CODEC_DECODES_RAW" ] |
| 1080 | |
| 1081 | deps = [ |
| 1082 | "//third_party/dng_sdk", |
| 1083 | "//third_party/libjpeg-turbo:libjpeg", |
| 1084 | "//third_party/piex", |
| 1085 | ] |
| 1086 | |
| 1087 | # SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of |
| 1088 | # Skia. |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1089 | configs = [ "gn/portable:add_exceptions" ] |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 1090 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1091 | sources = [ "src/codec/SkRawCodec.cpp" ] |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 1092 | } |
| 1093 | |
Mike Klein | 852a8cb | 2018-05-15 10:46:58 -0400 | [diff] [blame] | 1094 | import("third_party/skcms/skcms.gni") |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1095 | skia_source_set("skcms") { |
Mike Klein | 852a8cb | 2018-05-15 10:46:58 -0400 | [diff] [blame] | 1096 | cflags = [] |
| 1097 | if (!is_win || is_clang) { |
| 1098 | cflags += [ |
| 1099 | "-w", |
| 1100 | "-std=c11", |
| 1101 | ] |
| 1102 | } |
| 1103 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1104 | public = [ "include/third_party/skcms/skcms.h" ] |
Brian Osman | ea236bf | 2019-04-29 10:28:22 -0400 | [diff] [blame] | 1105 | include_dirs = [ "include/third_party/skcms" ] |
Mike Klein | 852a8cb | 2018-05-15 10:46:58 -0400 | [diff] [blame] | 1106 | sources = rebase_path(skcms_sources, ".", "third_party/skcms") |
| 1107 | } |
| 1108 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 1109 | optional("typeface_freetype") { |
| 1110 | enabled = skia_use_freetype |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 1111 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1112 | deps = [ "//third_party/freetype2" ] |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 1113 | sources = [ |
| 1114 | "src/ports/SkFontHost_FreeType.cpp", |
| 1115 | "src/ports/SkFontHost_FreeType_common.cpp", |
Ben Wagner | 9d5c55c | 2020-06-27 12:52:14 -0400 | [diff] [blame] | 1116 | "src/ports/SkFontHost_FreeType_common.h", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 1117 | ] |
| 1118 | } |
| 1119 | |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1120 | optional("webp_decode") { |
| 1121 | enabled = skia_use_libwebp_decode |
| 1122 | public_defines = [ "SK_CODEC_DECODES_WEBP" ] |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 1123 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1124 | deps = [ "//third_party/libwebp" ] |
| 1125 | sources = [ "src/codec/SkWebpCodec.cpp" ] |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1126 | } |
| 1127 | |
| 1128 | optional("webp_encode") { |
| 1129 | enabled = skia_use_libwebp_encode |
| 1130 | public_defines = [ "SK_ENCODE_WEBP" ] |
| 1131 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1132 | deps = [ "//third_party/libwebp" ] |
| 1133 | sources = [ "src/images/SkWebpEncoder.cpp" ] |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 1134 | } |
| 1135 | |
Leon Scroggins III | e93ec68 | 2018-10-26 09:25:51 -0400 | [diff] [blame] | 1136 | optional("wuffs") { |
| 1137 | enabled = skia_use_wuffs |
Nigel Tao | 5cfa719 | 2020-08-17 21:14:13 +1000 | [diff] [blame] | 1138 | public_defines = [ "SK_HAS_WUFFS_LIBRARY" ] |
Leon Scroggins III | e93ec68 | 2018-10-26 09:25:51 -0400 | [diff] [blame] | 1139 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1140 | deps = [ "//third_party/wuffs" ] |
| 1141 | sources = [ "src/codec/SkWuffsCodec.cpp" ] |
Leon Scroggins III | e93ec68 | 2018-10-26 09:25:51 -0400 | [diff] [blame] | 1142 | } |
| 1143 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1144 | optional("xml") { |
| 1145 | enabled = skia_use_expat |
Florin Malita | 442fff9 | 2016-11-08 16:07:52 +0000 | [diff] [blame] | 1146 | public_defines = [ "SK_XML" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1147 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1148 | deps = [ "//third_party/expat" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1149 | sources = [ |
Mike Klein | bd41bcc | 2017-02-09 16:38:15 -0500 | [diff] [blame] | 1150 | "src/svg/SkSVGCanvas.cpp", |
| 1151 | "src/svg/SkSVGDevice.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1152 | "src/xml/SkDOM.cpp", |
| 1153 | "src/xml/SkXMLParser.cpp", |
| 1154 | "src/xml/SkXMLWriter.cpp", |
| 1155 | ] |
| 1156 | } |
| 1157 | |
Mike Klein | 613ad38 | 2019-06-06 11:42:02 -0500 | [diff] [blame] | 1158 | optional("skvm_jit") { |
Mike Klein | 13ec544 | 2020-08-14 07:36:54 -0500 | [diff] [blame] | 1159 | enabled = skia_enable_skvm_jit_when_possible |
| 1160 | public_defines = [ "SKVM_JIT_WHEN_POSSIBLE" ] |
Mike Klein | 2b54e83 | 2020-07-10 12:56:07 -0500 | [diff] [blame] | 1161 | if (skia_vtune_path != "") { |
| 1162 | public_defines += [ "SKVM_JIT_VTUNE" ] |
| 1163 | public_include_dirs = [ "$skia_vtune_path/include" ] |
| 1164 | libs = [ "$skia_vtune_path/lib64/jitprofiling.lib" ] |
| 1165 | } |
Mike Klein | 613ad38 | 2019-06-06 11:42:02 -0500 | [diff] [blame] | 1166 | } |
| 1167 | |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 1168 | if (skia_enable_gpu && skia_generate_workarounds) { |
| 1169 | action("workaround_list") { |
| 1170 | script = "tools/build_workaround_header.py" |
| 1171 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1172 | inputs = [ "src/gpu/gpu_workaround_list.txt" ] |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 1173 | |
Brian Osman | ed5181e | 2021-07-01 13:54:20 -0400 | [diff] [blame] | 1174 | # GN insists its outputs should go somewhere underneath root_out_dir, so we trick it with a |
| 1175 | # path that starts with root_out_dir and then uses ".." to back up into the src dir. |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 1176 | output_file = |
Adrienne Walker | ab7181d | 2018-05-14 14:02:03 -0700 | [diff] [blame] | 1177 | rebase_path("include/gpu/GrDriverBugWorkaroundsAutogen.h", root_out_dir) |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 1178 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1179 | outputs = [ "$root_out_dir/$output_file" ] |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 1180 | args = [ |
| 1181 | "--output-file", |
| 1182 | "$output_file", |
| 1183 | ] |
| 1184 | |
| 1185 | foreach(file, inputs) { |
| 1186 | args += [ rebase_path(file, root_build_dir) ] |
| 1187 | } |
| 1188 | } |
| 1189 | } |
| 1190 | |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1191 | skia_component("skia") { |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1192 | public_configs = [ ":skia_public" ] |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1193 | configs = skia_library_configs |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1194 | |
Mike Klein | 607b0a7 | 2018-11-07 16:17:34 -0500 | [diff] [blame] | 1195 | public_deps = [ |
Ben Wagner | 32d5cfa | 2020-06-11 14:41:47 -0400 | [diff] [blame] | 1196 | ":fontmgr_FontConfigInterface", |
| 1197 | ":fontmgr_android", |
| 1198 | ":fontmgr_custom_directory", |
| 1199 | ":fontmgr_custom_embedded", |
| 1200 | ":fontmgr_custom_empty", |
| 1201 | ":fontmgr_fontconfig", |
| 1202 | ":fontmgr_fuchsia", |
| 1203 | ":fontmgr_mac_ct", |
| 1204 | ":fontmgr_win", |
| 1205 | ":fontmgr_win_gdi", |
Ben Wagner | e27ee6c | 2019-02-15 14:59:30 -0500 | [diff] [blame] | 1206 | ":gpu", |
Mike Klein | 607b0a7 | 2018-11-07 16:17:34 -0500 | [diff] [blame] | 1207 | ":pdf", |
| 1208 | ":skcms", |
Robert Phillips | 9b00f1f | 2020-03-24 12:29:44 -0400 | [diff] [blame] | 1209 | ":xps", |
Mike Klein | 607b0a7 | 2018-11-07 16:17:34 -0500 | [diff] [blame] | 1210 | ] |
| 1211 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1212 | deps = [ |
Leon Scroggins III | 63cfb36 | 2020-04-24 13:00:48 -0400 | [diff] [blame] | 1213 | ":android_utils", |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 1214 | ":arm64", |
| 1215 | ":armv7", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 1216 | ":avx", |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 1217 | ":crc32", |
Ben Wagner | 75626e4 | 2020-06-03 13:20:37 -0400 | [diff] [blame] | 1218 | ":fontmgr_factory", |
Leon Scroggins III | 4116920 | 2019-01-29 09:29:57 -0500 | [diff] [blame] | 1219 | ":gif", |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 1220 | ":heif", |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 1221 | ":hsw", |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1222 | ":jpeg_decode", |
| 1223 | ":jpeg_encode", |
Leon Scroggins III | 326b989 | 2020-08-05 16:51:10 -0400 | [diff] [blame] | 1224 | ":ndk_images", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 1225 | ":none", |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1226 | ":png_decode", |
| 1227 | ":png_encode", |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 1228 | ":raw", |
Mike Klein | 613ad38 | 2019-06-06 11:42:02 -0500 | [diff] [blame] | 1229 | ":skvm_jit", |
Mike Klein | a9026da | 2020-06-05 08:57:05 -0500 | [diff] [blame] | 1230 | ":skx", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 1231 | ":sse2", |
| 1232 | ":sse41", |
| 1233 | ":sse42", |
| 1234 | ":ssse3", |
Leon Scroggins III | a77f30c | 2020-03-09 14:23:30 -0400 | [diff] [blame] | 1235 | ":webp_decode", |
| 1236 | ":webp_encode", |
Leon Scroggins III | e93ec68 | 2018-10-26 09:25:51 -0400 | [diff] [blame] | 1237 | ":wuffs", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 1238 | ":xml", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1239 | ] |
| 1240 | |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1241 | public = skia_core_public |
| 1242 | public += skia_utils_public |
| 1243 | public += skia_effects_public |
| 1244 | public += skia_effects_imagefilter_public |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1245 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1246 | sources = [] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 1247 | sources += skia_core_sources |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 1248 | sources += skia_utils_sources |
Mike Klein | 5437823 | 2018-11-08 12:08:05 +0000 | [diff] [blame] | 1249 | sources += skia_effects_sources |
| 1250 | sources += skia_effects_imagefilter_sources |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1251 | sources += [ |
Stan Iliev | 73d8fd9 | 2017-08-02 15:36:24 -0400 | [diff] [blame] | 1252 | "src/android/SkAndroidFrameworkUtils.cpp", |
Leon Scroggins III | 42ee284 | 2018-01-14 14:46:51 -0500 | [diff] [blame] | 1253 | "src/android/SkAnimatedImage.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1254 | "src/codec/SkAndroidCodec.cpp", |
Nigel Tao | 612a65d | 2018-11-09 10:10:31 +1100 | [diff] [blame] | 1255 | "src/codec/SkAndroidCodecAdapter.cpp", |
Leon Scroggins III | d81fed9 | 2017-06-01 13:42:28 -0400 | [diff] [blame] | 1256 | "src/codec/SkBmpBaseCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 1257 | "src/codec/SkBmpCodec.cpp", |
| 1258 | "src/codec/SkBmpMaskCodec.cpp", |
| 1259 | "src/codec/SkBmpRLECodec.cpp", |
| 1260 | "src/codec/SkBmpStandardCodec.cpp", |
| 1261 | "src/codec/SkCodec.cpp", |
| 1262 | "src/codec/SkCodecImageGenerator.cpp", |
Leon Scroggins III | 22f673d | 2018-05-30 15:33:46 -0400 | [diff] [blame] | 1263 | "src/codec/SkColorTable.cpp", |
Leon Scroggins III | 36f7e32 | 2018-08-27 11:55:46 -0400 | [diff] [blame] | 1264 | "src/codec/SkEncodedInfo.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 1265 | "src/codec/SkMaskSwizzler.cpp", |
| 1266 | "src/codec/SkMasks.cpp", |
Leon Scroggins III | ba45830 | 2019-09-24 12:40:11 -0400 | [diff] [blame] | 1267 | "src/codec/SkParseEncodedOrigin.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1268 | "src/codec/SkSampledCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 1269 | "src/codec/SkSampler.cpp", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 1270 | "src/codec/SkStreamBuffer.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 1271 | "src/codec/SkSwizzler.cpp", |
| 1272 | "src/codec/SkWbmpCodec.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1273 | "src/images/SkImageEncoder.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1274 | "src/ports/SkDiscardableMemory_none.cpp", |
Mike Klein | 5437823 | 2018-11-08 12:08:05 +0000 | [diff] [blame] | 1275 | "src/ports/SkGlobalInitialization_default.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 1276 | "src/ports/SkImageGenerator_skia.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1277 | "src/ports/SkMemory_malloc.cpp", |
| 1278 | "src/ports/SkOSFile_stdio.cpp", |
| 1279 | "src/sfnt/SkOTTable_name.cpp", |
| 1280 | "src/sfnt/SkOTUtils.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1281 | ] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 1282 | |
Leon Scroggins | 1340dbd | 2020-11-09 14:18:12 -0500 | [diff] [blame] | 1283 | defines = [ "SK_HAS_ANDROID_CODEC" ] |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 1284 | libs = [] |
| 1285 | |
Brian Osman | 946a4cb | 2021-07-12 17:02:21 -0400 | [diff] [blame] | 1286 | if (skia_enable_sksl) { |
| 1287 | deps += [ ":dehydrate_sksl" ] |
| 1288 | sources += skia_sksl_sources |
| 1289 | } |
| 1290 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1291 | if (is_win) { |
| 1292 | sources += [ |
| 1293 | "src/ports/SkDebug_win.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1294 | "src/ports/SkImageEncoder_WIC.cpp", |
| 1295 | "src/ports/SkImageGeneratorWIC.cpp", |
| 1296 | "src/ports/SkOSFile_win.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 1297 | "src/ports/SkOSLibrary_win.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1298 | ] |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 1299 | libs += [ |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 1300 | "Ole32.lib", |
| 1301 | "OleAut32.lib", |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 1302 | ] |
James Clarke | b8c0dab | 2021-02-09 06:22:41 -0800 | [diff] [blame] | 1303 | |
| 1304 | if (!skia_enable_winuwp) { |
| 1305 | libs += [ |
| 1306 | "FontSub.lib", |
| 1307 | "User32.lib", |
| 1308 | "Usp10.lib", |
| 1309 | ] |
| 1310 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1311 | } else { |
| 1312 | sources += [ |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1313 | "src/ports/SkOSFile_posix.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 1314 | "src/ports/SkOSLibrary_posix.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1315 | ] |
Ben Wagner | be6ae5b | 2017-08-31 16:45:23 -0400 | [diff] [blame] | 1316 | libs += [ "dl" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1317 | } |
| 1318 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 1319 | if (is_android) { |
Mike Klein | 1c47187 | 2017-01-13 15:27:45 -0500 | [diff] [blame] | 1320 | deps += [ "//third_party/expat" ] |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 1321 | if (defined(ndk) && ndk != "") { |
Mike Klein | 1c47187 | 2017-01-13 15:27:45 -0500 | [diff] [blame] | 1322 | deps += [ "//third_party/cpu-features" ] |
| 1323 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 1324 | sources += [ "src/ports/SkDebug_android.cpp" ] |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 1325 | libs += [ |
| 1326 | "EGL", |
| 1327 | "GLESv2", |
| 1328 | "log", |
| 1329 | ] |
| 1330 | } |
| 1331 | |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 1332 | if (is_linux || target_cpu == "wasm") { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 1333 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
Hal Canary | 25375e8 | 2018-03-14 15:16:56 -0400 | [diff] [blame] | 1334 | if (skia_use_egl) { |
| 1335 | libs += [ "GLESv2" ] |
| 1336 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1337 | } |
| 1338 | |
| 1339 | if (is_mac) { |
| 1340 | sources += [ |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 1341 | "src/ports/SkDebug_stdio.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1342 | "src/ports/SkImageEncoder_CG.cpp", |
| 1343 | "src/ports/SkImageGeneratorCG.cpp", |
| 1344 | ] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 1345 | frameworks = [ |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 1346 | "ApplicationServices.framework", |
| 1347 | "OpenGL.framework", |
| 1348 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1349 | } |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 1350 | |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1351 | if (is_ios) { |
| 1352 | sources += [ |
| 1353 | "src/ports/SkDebug_stdio.cpp", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1354 | "src/ports/SkImageEncoder_CG.cpp", |
| 1355 | "src/ports/SkImageGeneratorCG.cpp", |
| 1356 | ] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 1357 | frameworks = [ |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1358 | "CoreFoundation.framework", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1359 | "ImageIO.framework", |
| 1360 | "MobileCoreServices.framework", |
| 1361 | ] |
| 1362 | } |
| 1363 | |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 1364 | if (is_fuchsia) { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 1365 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 1366 | } |
Brian Osman | fb32ddf | 2019-06-18 10:14:20 -0400 | [diff] [blame] | 1367 | |
| 1368 | if (skia_enable_spirv_validation) { |
Corentin Wallez | 89d6e79 | 2021-03-08 15:25:34 +0100 | [diff] [blame] | 1369 | deps += [ "//third_party/externals/spirv-tools:spvtools_val" ] |
Brian Osman | fb32ddf | 2019-06-18 10:14:20 -0400 | [diff] [blame] | 1370 | defines += [ "SK_ENABLE_SPIRV_VALIDATION" ] |
| 1371 | } |
Nathaniel Nifong | 0c4fbf1 | 2019-06-25 15:48:47 -0400 | [diff] [blame] | 1372 | |
| 1373 | if (skia_include_multiframe_procs) { |
| 1374 | sources += [ "tools/SkSharingProc.cpp" ] |
| 1375 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1376 | } |
| 1377 | |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1378 | # DebugCanvas used in experimental/wasm-skp-debugger |
| 1379 | if (target_cpu == "wasm") { |
Ben Wagner | 25eb534 | 2021-03-22 14:07:15 -0400 | [diff] [blame] | 1380 | skia_static_library("debugcanvas") { |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1381 | public_configs = [ ":skia_public" ] |
| 1382 | |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1383 | sources = [ |
Nathaniel Nifong | 0426c38 | 2019-06-21 11:09:19 -0400 | [diff] [blame] | 1384 | "tools/SkSharingProc.cpp", |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1385 | "tools/UrlDataManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 1386 | "tools/debugger/DebugCanvas.cpp", |
Nathaniel Nifong | 20b177a | 2019-12-12 11:05:10 -0500 | [diff] [blame] | 1387 | "tools/debugger/DebugLayerManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 1388 | "tools/debugger/DrawCommand.cpp", |
| 1389 | "tools/debugger/JsonWriteBuffer.cpp", |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1390 | ] |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1391 | } |
| 1392 | } |
| 1393 | |
Ben Wagner | 25eb534 | 2021-03-22 14:07:15 -0400 | [diff] [blame] | 1394 | skia_static_library("pathkit") { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1395 | check_includes = false |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1396 | public_configs = [ ":skia_public" ] |
Ben Wagner | 25eb534 | 2021-03-22 14:07:15 -0400 | [diff] [blame] | 1397 | configs = skia_library_configs |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1398 | |
| 1399 | deps = [ |
| 1400 | ":arm64", |
| 1401 | ":armv7", |
| 1402 | ":avx", |
| 1403 | ":crc32", |
| 1404 | ":hsw", |
| 1405 | ":none", |
| 1406 | ":sse2", |
| 1407 | ":sse41", |
| 1408 | ":sse42", |
| 1409 | ":ssse3", |
| 1410 | ] |
| 1411 | |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1412 | sources = [] |
| 1413 | sources += skia_pathops_sources |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1414 | sources += skia_pathops_public |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1415 | sources += [ |
| 1416 | "src/core/SkAnalyticEdge.cpp", |
| 1417 | "src/core/SkArenaAlloc.cpp", |
Mike Reed | cc88f3a | 2019-02-06 11:40:27 -0500 | [diff] [blame] | 1418 | "src/core/SkContourMeasure.cpp", |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1419 | "src/core/SkCubicMap.cpp", |
| 1420 | "src/core/SkEdge.cpp", |
| 1421 | "src/core/SkEdgeBuilder.cpp", |
| 1422 | "src/core/SkEdgeClipper.cpp", |
| 1423 | "src/core/SkGeometry.cpp", |
Brian Salomon | 71fe945 | 2020-03-02 16:59:40 -0500 | [diff] [blame] | 1424 | "src/core/SkIDChangeListener.cpp", |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1425 | "src/core/SkLineClipper.cpp", |
Hal Canary | 7823aeb | 2019-10-30 17:26:45 -0400 | [diff] [blame] | 1426 | "src/core/SkMalloc.cpp", |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1427 | "src/core/SkMallocPixelRef.cpp", |
| 1428 | "src/core/SkMath.cpp", |
| 1429 | "src/core/SkMatrix.cpp", |
| 1430 | "src/core/SkOpts.cpp", |
| 1431 | "src/core/SkPaint.cpp", |
Tyler Denniston | f8b7c1a | 2021-07-13 13:22:19 -0400 | [diff] [blame] | 1432 | "src/core/SkPaintPriv.cpp", |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1433 | "src/core/SkPath.cpp", |
Mike Reed | 06d7c9d | 2020-08-26 12:56:51 -0400 | [diff] [blame] | 1434 | "src/core/SkPathBuilder.cpp", |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1435 | "src/core/SkPathEffect.cpp", |
| 1436 | "src/core/SkPathMeasure.cpp", |
| 1437 | "src/core/SkPathRef.cpp", |
| 1438 | "src/core/SkPoint.cpp", |
| 1439 | "src/core/SkRRect.cpp", |
Mike Klein | 45f36b5 | 2020-06-08 14:10:29 -0500 | [diff] [blame] | 1440 | "src/core/SkReadBuffer.cpp", |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1441 | "src/core/SkRect.cpp", |
| 1442 | "src/core/SkSemaphore.cpp", |
| 1443 | "src/core/SkStream.cpp", |
| 1444 | "src/core/SkString.cpp", |
| 1445 | "src/core/SkStringUtils.cpp", |
| 1446 | "src/core/SkStroke.cpp", |
| 1447 | "src/core/SkStrokeRec.cpp", |
| 1448 | "src/core/SkStrokerPriv.cpp", |
| 1449 | "src/core/SkThreadID.cpp", |
| 1450 | "src/core/SkUtils.cpp", |
| 1451 | "src/effects/SkDashPathEffect.cpp", |
| 1452 | "src/effects/SkTrimPathEffect.cpp", |
| 1453 | "src/ports/SkDebug_stdio.cpp", |
| 1454 | "src/ports/SkMemory_malloc.cpp", |
| 1455 | "src/utils/SkDashPath.cpp", |
| 1456 | "src/utils/SkParse.cpp", |
| 1457 | "src/utils/SkParsePath.cpp", |
| 1458 | "src/utils/SkUTF.cpp", |
| 1459 | ] |
| 1460 | } |
| 1461 | |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 1462 | group("modules") { |
| 1463 | deps = [ |
Kevin Lubick | 9663484 | 2019-03-05 14:09:24 -0500 | [diff] [blame] | 1464 | "modules/particles", |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 1465 | "modules/skottie", |
Mike Reed | 63559a5 | 2020-06-02 11:34:24 -0400 | [diff] [blame] | 1466 | "modules/skparagraph", |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 1467 | "modules/skshaper", |
Tyler Denniston | 333b938 | 2021-03-18 13:48:52 -0400 | [diff] [blame] | 1468 | "modules/svg", |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 1469 | ] |
| 1470 | } |
| 1471 | |
Julia Lavrova | 159fd84 | 2021-02-24 12:15:08 -0500 | [diff] [blame] | 1472 | group("experimental") { |
| 1473 | deps = [ "experimental/sktext" ] |
| 1474 | } |
| 1475 | |
Brian Osman | cd28fa6 | 2020-07-07 16:01:26 -0400 | [diff] [blame] | 1476 | config("our_vulkan_headers") { |
| 1477 | include_dirs = [ "include/third_party/vulkan" ] |
| 1478 | } |
| 1479 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1480 | # Targets guarded by skia_enable_tools may use //third_party freely. |
| 1481 | if (skia_enable_tools) { |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1482 | skia_public_includes = [ |
Leon Scroggins III | 63cfb36 | 2020-04-24 13:00:48 -0400 | [diff] [blame] | 1483 | "client_utils/android", |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1484 | "include/android", |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1485 | "include/c", |
| 1486 | "include/codec", |
| 1487 | "include/config", |
| 1488 | "include/core", |
| 1489 | "include/docs", |
| 1490 | "include/effects", |
| 1491 | "include/encode", |
| 1492 | "include/gpu", |
| 1493 | "include/pathops", |
| 1494 | "include/ports", |
| 1495 | "include/svg", |
| 1496 | "include/utils", |
| 1497 | "include/utils/mac", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 1498 | "modules/particles/include", |
| 1499 | "modules/skottie/include", |
Julia Lavrova | 70258c7 | 2020-07-15 11:28:57 -0400 | [diff] [blame] | 1500 | "modules/skparagraph/include", |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1501 | "modules/skshaper/include", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 1502 | "modules/svg/include", |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1503 | ] |
| 1504 | |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 1505 | # Used by gn_to_bp.py to list our public include dirs. |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1506 | skia_source_set("public") { |
| 1507 | configs = [ ":skia_public" ] |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1508 | include_dirs = skia_public_includes |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 1509 | } |
| 1510 | |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1511 | config("skia.h_config") { |
| 1512 | include_dirs = [ "$target_gen_dir" ] |
| 1513 | } |
| 1514 | action("skia.h") { |
| 1515 | public_configs = [ ":skia.h_config" ] |
| 1516 | skia_h = "$target_gen_dir/skia.h" |
| 1517 | script = "gn/find_headers.py" |
Florin Malita | 6e4d95f | 2018-05-30 09:27:32 -0400 | [diff] [blame] | 1518 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1519 | args = [ rebase_path("//bin/gn") ] + [ rebase_path("//") ] + |
| 1520 | [ rebase_path(skia_h, root_build_dir) ] + |
| 1521 | rebase_path(skia_public_includes) |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1522 | depfile = "$skia_h.deps" |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1523 | outputs = [ skia_h ] |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1524 | } |
| 1525 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1526 | if (target_cpu == "x64") { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1527 | skia_executable("fiddle") { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1528 | check_includes = false |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1529 | libs = [] |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1530 | sources = [ |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1531 | "tools/fiddle/draw.cpp", |
| 1532 | "tools/fiddle/fiddle_main.cpp", |
| 1533 | ] |
Joe Gregorio | a8fabd3 | 2017-05-31 09:45:19 -0400 | [diff] [blame] | 1534 | |
| 1535 | if (skia_use_egl) { |
| 1536 | sources += [ "tools/fiddle/egl_context.cpp" ] |
Joe Gregorio | a8fabd3 | 2017-05-31 09:45:19 -0400 | [diff] [blame] | 1537 | } else { |
| 1538 | sources += [ "tools/fiddle/null_context.cpp" ] |
| 1539 | } |
Joe Gregorio | 1e735c0 | 2017-04-19 14:05:14 -0400 | [diff] [blame] | 1540 | testonly = true |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1541 | deps = [ |
Joe Gregorio | 1e735c0 | 2017-04-19 14:05:14 -0400 | [diff] [blame] | 1542 | ":flags", |
Robert Phillips | 57e0828 | 2017-11-16 14:59:48 -0500 | [diff] [blame] | 1543 | ":gpu_tool_utils", |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1544 | ":skia", |
| 1545 | ":skia.h", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 1546 | "modules/particles", |
Florin Malita | 6e4d95f | 2018-05-30 09:27:32 -0400 | [diff] [blame] | 1547 | "modules/skottie", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 1548 | "modules/skparagraph", |
Florin Malita | a1dcaae | 2019-03-25 17:38:43 -0400 | [diff] [blame] | 1549 | "modules/skshaper", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 1550 | "modules/svg", |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1551 | ] |
| 1552 | } |
| 1553 | } |
| 1554 | |
Mike Klein | e5463e6 | 2020-06-11 13:53:53 -0500 | [diff] [blame] | 1555 | config("cpp14") { |
| 1556 | if (is_win) { |
| 1557 | cflags_cc = [ "/std:c++14" ] |
| 1558 | } else { |
| 1559 | cflags_cc = [ "-std=c++14" ] |
| 1560 | } |
| 1561 | } |
| 1562 | |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1563 | skia_source_set("public_headers_warnings_check") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1564 | sources = [ "tools/public_headers_warnings_check.cpp" ] |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1565 | configs = [ |
Mike Klein | e5463e6 | 2020-06-11 13:53:53 -0500 | [diff] [blame] | 1566 | ":our_vulkan_headers", |
| 1567 | ":cpp14", |
| 1568 | ] |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1569 | if (defined(skia_header_target_default_configs)) { |
| 1570 | configs += skia_header_target_default_configs |
| 1571 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1572 | deps = [ |
| 1573 | ":skia", |
| 1574 | ":skia.h", |
| 1575 | "modules/skottie", |
Florin Malita | a1dcaae | 2019-03-25 17:38:43 -0400 | [diff] [blame] | 1576 | "modules/skshaper", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1577 | ] |
Stephen White | 0d70b71 | 2019-07-10 15:51:30 -0400 | [diff] [blame] | 1578 | |
| 1579 | if (skia_use_dawn) { |
Zhenyao Mo | 4f17b60 | 2020-04-13 15:26:17 -0700 | [diff] [blame] | 1580 | deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ] |
Stephen White | 0d70b71 | 2019-07-10 15:51:30 -0400 | [diff] [blame] | 1581 | } |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1582 | } |
| 1583 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1584 | template("test_lib") { |
| 1585 | config(target_name + "_config") { |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 1586 | if (defined(invoker.public_defines)) { |
| 1587 | defines = invoker.public_defines |
| 1588 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1589 | } |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1590 | skia_source_set(target_name) { |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1591 | forward_variables_from(invoker, "*", []) |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1592 | check_includes = false |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1593 | public_configs = [ |
| 1594 | ":" + target_name + "_config", |
| 1595 | ":skia_private", |
| 1596 | ] |
| 1597 | |
| 1598 | if (!defined(deps)) { |
| 1599 | deps = [] |
| 1600 | } |
| 1601 | deps += [ ":skia" ] |
| 1602 | testonly = true |
| 1603 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1604 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1605 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1606 | template("test_app") { |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1607 | if (is_ios) { |
Hal Canary | 3388c1a | 2019-09-16 12:53:17 -0400 | [diff] [blame] | 1608 | ios_app_bundle(target_name) { |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1609 | forward_variables_from(invoker, |
| 1610 | "*", |
| 1611 | [ |
| 1612 | "output_name", |
| 1613 | "visibility", |
| 1614 | "is_shared_library", |
| 1615 | ]) |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1616 | testonly = true |
Hal Canary | 3388c1a | 2019-09-16 12:53:17 -0400 | [diff] [blame] | 1617 | extra_configs = [ ":skia_private" ] |
| 1618 | launchscreen = "platform_tools/ios/app/LaunchScreen.storyboard" |
| 1619 | data_sources = [ "resources" ] |
| 1620 | if ("True" == exec_script("//gn/checkdir.py", |
| 1621 | [ rebase_path("skps", root_build_dir) ], |
| 1622 | "trim string")) { |
| 1623 | data_sources += [ "skps" ] |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1624 | } |
Brian Salomon | 06c9e29 | 2021-04-29 14:10:23 -0400 | [diff] [blame] | 1625 | if ("True" == exec_script("//gn/checkdir.py", |
| 1626 | [ rebase_path("mskps", root_build_dir) ], |
| 1627 | "trim string")) { |
| 1628 | data_sources += [ "mskps" ] |
| 1629 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1630 | } |
| 1631 | } else { |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1632 | # !is_ios |
| 1633 | |
| 1634 | if (defined(invoker.is_shared_library) && invoker.is_shared_library) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1635 | skia_shared_library("lib" + target_name) { |
| 1636 | output_dir = root_build_dir |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1637 | forward_variables_from(invoker, "*", [ "is_shared_library" ]) |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1638 | if (!defined(configs)) { |
| 1639 | configs = [] |
| 1640 | } |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1641 | configs += [ ":skia_private" ] |
| 1642 | testonly = true |
| 1643 | } |
| 1644 | } else { |
| 1645 | _executable = target_name |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1646 | skia_executable(_executable) { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1647 | check_includes = false |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1648 | output_dir = root_build_dir |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1649 | forward_variables_from(invoker, "*", [ "is_shared_library" ]) |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1650 | if (!defined(configs)) { |
| 1651 | configs = [] |
| 1652 | } |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1653 | configs += [ ":skia_private" ] |
| 1654 | testonly = true |
| 1655 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1656 | } |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1657 | if (is_android && skia_android_serial != "" && defined(_executable)) { |
| 1658 | action("push_" + target_name) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 1659 | output_dir = root_build_dir |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1660 | script = "gn/push_to_android.py" |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1661 | deps = [ ":" + _executable ] |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1662 | _stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial" |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1663 | outputs = [ _stamp ] |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1664 | args = [ |
| 1665 | rebase_path("$root_build_dir/$_executable"), |
| 1666 | skia_android_serial, |
| 1667 | rebase_path(_stamp), |
| 1668 | ] |
| 1669 | testonly = true |
| 1670 | } |
Mike Klein | 7d92103 | 2017-01-05 12:20:41 -0500 | [diff] [blame] | 1671 | } |
| 1672 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1673 | } |
| 1674 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1675 | test_lib("gpu_tool_utils") { |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1676 | public_defines = [] |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 1677 | |
Mike Klein | 9e25bb9 | 2019-04-29 09:46:36 -0500 | [diff] [blame] | 1678 | # Bots and even devs may not have Vulkan headers, so put |
| 1679 | # include/third_party/vulkan on our path so they're always available. |
| 1680 | all_dependent_configs = [ ":our_vulkan_headers" ] |
| 1681 | |
Mike Klein | 333fb45 | 2019-04-24 08:48:11 -0500 | [diff] [blame] | 1682 | defines = [] |
| 1683 | if (skia_enable_discrete_gpu) { |
| 1684 | defines += [ "SK_ENABLE_DISCRETE_GPU" ] |
| 1685 | } |
| 1686 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1687 | deps = [] |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 1688 | public_deps = [] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1689 | sources = [ |
Brian Salomon | 72c7b98 | 2020-10-06 10:07:38 -0400 | [diff] [blame] | 1690 | "tools/gpu/BackendSurfaceFactory.cpp", |
| 1691 | "tools/gpu/BackendSurfaceFactory.h", |
Brian Salomon | 63a0a75 | 2020-06-26 13:32:09 -0400 | [diff] [blame] | 1692 | "tools/gpu/BackendTextureImageFactory.cpp", |
| 1693 | "tools/gpu/BackendTextureImageFactory.h", |
Robert Phillips | 00f78de | 2020-07-01 16:09:43 -0400 | [diff] [blame] | 1694 | "tools/gpu/FlushFinishTracker.cpp", |
| 1695 | "tools/gpu/FlushFinishTracker.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1696 | "tools/gpu/GrContextFactory.cpp", |
| 1697 | "tools/gpu/GrTest.cpp", |
Brian Salomon | f9b0042 | 2020-10-08 16:00:14 -0400 | [diff] [blame] | 1698 | "tools/gpu/ManagedBackendTexture.cpp", |
| 1699 | "tools/gpu/ManagedBackendTexture.h", |
Brian Salomon | 00a5eb8 | 2018-07-11 15:32:05 -0400 | [diff] [blame] | 1700 | "tools/gpu/MemoryCache.cpp", |
| 1701 | "tools/gpu/MemoryCache.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1702 | "tools/gpu/ProxyUtils.cpp", |
| 1703 | "tools/gpu/TestContext.cpp", |
Brian Salomon | e21af50 | 2019-11-22 16:56:36 -0500 | [diff] [blame] | 1704 | "tools/gpu/TestOps.cpp", |
| 1705 | "tools/gpu/TestOps.h", |
Michael Ludwig | d9958f8 | 2019-03-21 13:08:36 -0400 | [diff] [blame] | 1706 | "tools/gpu/YUVUtils.cpp", |
| 1707 | "tools/gpu/YUVUtils.h", |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1708 | "tools/gpu/gl/GLTestContext.cpp", # See comment below about |
| 1709 | # GrContextFactory workaround. |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1710 | "tools/gpu/mock/MockTestContext.cpp", |
| 1711 | ] |
Brian Salomon | 1171d31 | 2020-03-19 08:47:44 -0400 | [diff] [blame] | 1712 | |
| 1713 | libs = [] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 1714 | frameworks = [] |
Brian Salomon | 1171d31 | 2020-03-19 08:47:44 -0400 | [diff] [blame] | 1715 | |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 1716 | if (skia_use_gl) { |
Herb Derby | 64aa513 | 2020-06-03 12:14:55 -0400 | [diff] [blame] | 1717 | sources += |
| 1718 | [ "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp" ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 1719 | if (is_ios) { |
| 1720 | sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 1721 | frameworks += [ "OpenGLES.framework" ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 1722 | } else if (is_mac) { |
| 1723 | sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
Brian Osman | 0c75727 | 2018-12-10 10:27:26 -0500 | [diff] [blame] | 1724 | } |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 1725 | if (skia_use_angle) { |
| 1726 | deps += [ "//third_party/angle2" ] |
| 1727 | sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ] |
| 1728 | } |
Brian Salomon | 1171d31 | 2020-03-19 08:47:44 -0400 | [diff] [blame] | 1729 | } |
| 1730 | |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 1731 | # We need the GLTestContext on Vulkan-only builds for the persistent GL context workaround in |
| 1732 | # in GrContextFactory. This only matters for OSes that can run Vulkan. |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 1733 | if ((skia_use_gl || skia_use_vulkan) && target_cpu != "wasm") { |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 1734 | if (is_android || skia_use_egl) { |
| 1735 | sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
| 1736 | libs += [ "EGL" ] |
| 1737 | } else if (is_linux) { |
| 1738 | sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
| 1739 | libs += [ |
| 1740 | "GLU", |
| 1741 | "GL", |
| 1742 | "X11", |
| 1743 | ] |
| 1744 | } else if (is_win) { |
| 1745 | sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ] |
| 1746 | libs += [ "Gdi32.lib" ] |
| 1747 | if (target_cpu != "arm64") { |
| 1748 | libs += [ "OpenGL32.lib" ] |
| 1749 | } |
| 1750 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1751 | } |
Greg Daniel | 54200e4 | 2018-12-11 17:03:39 -0500 | [diff] [blame] | 1752 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1753 | if (skia_use_vulkan) { |
Robert Phillips | ae413d8 | 2020-06-10 11:04:51 -0400 | [diff] [blame] | 1754 | sources += [ "tools/gpu/vk/VkTestContext.h" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1755 | sources += [ "tools/gpu/vk/VkTestContext.cpp" ] |
Robert Phillips | 0d6ce7c | 2020-06-11 08:51:50 -0400 | [diff] [blame] | 1756 | sources += [ "tools/gpu/vk/VkTestHelper.h" ] |
| 1757 | sources += [ "tools/gpu/vk/VkTestHelper.cpp" ] |
Robert Phillips | ae413d8 | 2020-06-10 11:04:51 -0400 | [diff] [blame] | 1758 | sources += [ "tools/gpu/vk/VkTestUtils.h" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1759 | sources += [ "tools/gpu/vk/VkTestUtils.cpp" ] |
Robert Phillips | ae413d8 | 2020-06-10 11:04:51 -0400 | [diff] [blame] | 1760 | sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.h" ] |
| 1761 | sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.cpp" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1762 | } |
| 1763 | if (skia_use_metal) { |
| 1764 | sources += [ "tools/gpu/mtl/MtlTestContext.mm" ] |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 1765 | } |
Jim Van Verth | b01e12b | 2020-02-18 14:34:38 -0500 | [diff] [blame] | 1766 | if (skia_use_direct3d) { |
| 1767 | sources += [ "tools/gpu/d3d/D3DTestContext.cpp" ] |
Jim Van Verth | 03b8ab2 | 2020-02-24 11:36:15 -0500 | [diff] [blame] | 1768 | sources += [ "tools/gpu/d3d/D3DTestUtils.cpp" ] |
Jim Van Verth | b01e12b | 2020-02-18 14:34:38 -0500 | [diff] [blame] | 1769 | } |
Stephen White | 985741a | 2019-07-18 11:43:45 -0400 | [diff] [blame] | 1770 | if (skia_use_dawn) { |
Zhenyao Mo | 4f17b60 | 2020-04-13 15:26:17 -0700 | [diff] [blame] | 1771 | public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ] |
Stephen White | 985741a | 2019-07-18 11:43:45 -0400 | [diff] [blame] | 1772 | sources += [ "tools/gpu/dawn/DawnTestContext.cpp" ] |
Stephen White | 3ae5b29 | 2020-06-01 15:45:56 -0400 | [diff] [blame] | 1773 | if (is_clang) { |
| 1774 | cflags_cc = [ "-Wno-microsoft-cast" ] |
| 1775 | } |
Stephen White | 985741a | 2019-07-18 11:43:45 -0400 | [diff] [blame] | 1776 | } |
Robert Phillips | 72354b0 | 2021-07-06 13:43:56 -0400 | [diff] [blame] | 1777 | if (!skia_enable_skgpu_v1) { |
| 1778 | sources -= [ "tools/gpu/GrTest.cpp" ] |
| 1779 | sources -= [ "tools/gpu/TestOps.cpp" ] |
| 1780 | sources -= [ "tools/gpu/TestOps.h" ] |
| 1781 | } |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 1782 | |
| 1783 | if (is_fuchsia && using_fuchsia_sdk) { |
| 1784 | libs += |
| 1785 | [ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ] |
| 1786 | } |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 1787 | } # test_lib("gpu_tool_utils") |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1788 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1789 | test_lib("flags") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1790 | sources = [ "tools/flags/CommandLineFlags.cpp" ] |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1791 | } |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1792 | |
| 1793 | test_lib("common_flags_config") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1794 | sources = [ "tools/flags/CommonFlagsConfig.cpp" ] |
| 1795 | deps = [ ":flags" ] |
| 1796 | public_deps = [ ":gpu_tool_utils" ] |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1797 | } |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1798 | test_lib("common_flags_gpu") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1799 | sources = [ "tools/flags/CommonFlagsGpu.cpp" ] |
| 1800 | deps = [ ":flags" ] |
| 1801 | public_deps = [ ":gpu_tool_utils" ] |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1802 | } |
| 1803 | test_lib("common_flags_images") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1804 | sources = [ "tools/flags/CommonFlagsImages.cpp" ] |
| 1805 | deps = [ ":flags" ] |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1806 | } |
| 1807 | test_lib("common_flags_aa") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1808 | sources = [ "tools/flags/CommonFlagsAA.cpp" ] |
| 1809 | deps = [ ":flags" ] |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1810 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1811 | |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 1812 | test_lib("trace") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1813 | deps = [ ":flags" ] |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 1814 | sources = [ |
| 1815 | "tools/trace/ChromeTracingTracer.cpp", |
| 1816 | "tools/trace/ChromeTracingTracer.h", |
| 1817 | "tools/trace/EventTracingPriv.cpp", |
| 1818 | "tools/trace/EventTracingPriv.h", |
| 1819 | "tools/trace/SkDebugfTracer.cpp", |
| 1820 | "tools/trace/SkDebugfTracer.h", |
| 1821 | ] |
| 1822 | } |
| 1823 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1824 | test_lib("tool_utils") { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1825 | sources = [ |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 1826 | "tools/AndroidSkDebugToStdOut.cpp", |
Jim Van Verth | 8a9a371 | 2019-05-31 10:49:12 -0400 | [diff] [blame] | 1827 | "tools/AutoreleasePool.h", |
Robert Phillips | 9660108 | 2018-05-29 16:13:26 -0400 | [diff] [blame] | 1828 | "tools/DDLPromiseImageHelper.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1829 | "tools/DDLPromiseImageHelper.h", |
Robert Phillips | 9660108 | 2018-05-29 16:13:26 -0400 | [diff] [blame] | 1830 | "tools/DDLTileHelper.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1831 | "tools/DDLTileHelper.h", |
mtklein | 0590fa5 | 2016-09-01 07:06:54 -0700 | [diff] [blame] | 1832 | "tools/LsanSuppressions.cpp", |
Brian Salomon | 06c9e29 | 2021-04-29 14:10:23 -0400 | [diff] [blame] | 1833 | "tools/MSKPPlayer.cpp", |
| 1834 | "tools/MSKPPlayer.h", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1835 | "tools/ProcStats.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1836 | "tools/ProcStats.h", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1837 | "tools/Resources.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1838 | "tools/Resources.h", |
John Stiles | b5ac66c | 2021-07-14 14:04:49 -0400 | [diff] [blame] | 1839 | "tools/RuntimeBlendUtils.cpp", |
| 1840 | "tools/RuntimeBlendUtils.h", |
Hal Canary | e574f1e | 2019-07-15 14:01:37 -0400 | [diff] [blame] | 1841 | "tools/SkMetaData.cpp", |
| 1842 | "tools/SkMetaData.h", |
Nathaniel Nifong | 0426c38 | 2019-06-21 11:09:19 -0400 | [diff] [blame] | 1843 | "tools/SkSharingProc.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1844 | "tools/SkSharingProc.h", |
| 1845 | "tools/Stats.h", |
Mike Klein | ea3f014 | 2019-03-20 11:12:10 -0500 | [diff] [blame] | 1846 | "tools/ToolUtils.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1847 | "tools/ToolUtils.h", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1848 | "tools/UrlDataManager.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1849 | "tools/UrlDataManager.h", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 1850 | "tools/debugger/DebugCanvas.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1851 | "tools/debugger/DebugCanvas.h", |
Nathaniel Nifong | 20b177a | 2019-12-12 11:05:10 -0500 | [diff] [blame] | 1852 | "tools/debugger/DebugLayerManager.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1853 | "tools/debugger/DebugLayerManager.h", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 1854 | "tools/debugger/DrawCommand.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1855 | "tools/debugger/DrawCommand.h", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 1856 | "tools/debugger/JsonWriteBuffer.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1857 | "tools/debugger/JsonWriteBuffer.h", |
Mike Klein | 0cffcbf9 | 2019-03-20 11:08:46 -0500 | [diff] [blame] | 1858 | "tools/fonts/RandomScalerContext.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1859 | "tools/fonts/RandomScalerContext.h", |
Mike Klein | 0cffcbf9 | 2019-03-20 11:08:46 -0500 | [diff] [blame] | 1860 | "tools/fonts/TestEmptyTypeface.h", |
| 1861 | "tools/fonts/TestFontMgr.cpp", |
| 1862 | "tools/fonts/TestFontMgr.h", |
| 1863 | "tools/fonts/TestSVGTypeface.cpp", |
| 1864 | "tools/fonts/TestSVGTypeface.h", |
| 1865 | "tools/fonts/TestTypeface.cpp", |
| 1866 | "tools/fonts/TestTypeface.h", |
Mike Klein | ea3f014 | 2019-03-20 11:12:10 -0500 | [diff] [blame] | 1867 | "tools/fonts/ToolUtilsFont.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1868 | "tools/random_parse_path.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1869 | "tools/random_parse_path.h", |
Hal Canary | 4124807 | 2019-07-11 16:32:53 -0400 | [diff] [blame] | 1870 | "tools/timer/TimeUtils.h", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1871 | "tools/timer/Timer.cpp", |
John Stiles | affae53 | 2020-07-13 18:06:53 -0400 | [diff] [blame] | 1872 | "tools/timer/Timer.h", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1873 | ] |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 1874 | if (target_cpu != "wasm") { |
| 1875 | sources += [ "tools/CrashHandler.cpp" ] |
| 1876 | } |
Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 1877 | libs = [] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 1878 | frameworks = [] |
Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 1879 | if (is_ios) { |
| 1880 | sources += [ "tools/ios_utils.m" ] |
Jim Van Verth | 8a9a371 | 2019-05-31 10:49:12 -0400 | [diff] [blame] | 1881 | sources += [ "tools/ios_utils.h" ] |
| 1882 | if (skia_use_metal) { |
| 1883 | sources += [ "tools/AutoreleasePool.mm" ] |
| 1884 | } |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 1885 | frameworks += [ "Foundation.framework" ] |
Jim Van Verth | 8a9a371 | 2019-05-31 10:49:12 -0400 | [diff] [blame] | 1886 | } else if (is_mac) { |
| 1887 | if (skia_use_metal) { |
| 1888 | sources += [ "tools/AutoreleasePool.mm" ] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 1889 | frameworks += [ "Foundation.framework" ] |
Jim Van Verth | 8a9a371 | 2019-05-31 10:49:12 -0400 | [diff] [blame] | 1890 | } |
James Clarke | b8c0dab | 2021-02-09 06:22:41 -0800 | [diff] [blame] | 1891 | } else if (is_win && !skia_enable_winuwp) { |
Mike Klein | bf15b66 | 2019-04-15 11:32:16 -0500 | [diff] [blame] | 1892 | libs += [ "DbgHelp.lib" ] |
Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 1893 | } |
Mike Klein | bf15b66 | 2019-04-15 11:32:16 -0500 | [diff] [blame] | 1894 | |
Hal Canary | fd9bcab | 2018-04-24 11:47:23 -0400 | [diff] [blame] | 1895 | defines = [] |
| 1896 | if (skia_tools_require_resources) { |
| 1897 | defines += [ "SK_TOOLS_REQUIRE_RESOURCES" ] |
| 1898 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1899 | deps = [ |
| 1900 | ":flags", |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 1901 | "modules/svg", |
Mike Klein | e4ad58a | 2019-03-26 09:05:52 -0500 | [diff] [blame] | 1902 | ] |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1903 | public_deps = [ ":gpu_tool_utils" ] |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1904 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1905 | |
Mike Klein | e11e5c1 | 2019-04-24 12:46:06 -0500 | [diff] [blame] | 1906 | test_lib("etc1") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1907 | sources = [ "third_party/etc1/etc1.cpp" ] |
Mike Klein | e11e5c1 | 2019-04-24 12:46:06 -0500 | [diff] [blame] | 1908 | } |
| 1909 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1910 | import("gn/gm.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1911 | test_lib("gm") { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1912 | sources = gm_sources |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 1913 | if (skia_use_gl) { |
| 1914 | sources += gl_gm_sources |
| 1915 | } |
Robert Phillips | 024668c | 2021-07-01 12:12:52 -0400 | [diff] [blame] | 1916 | if (!skia_enable_skgpu_v1) { |
| 1917 | sources -= skgpu_v1_gm_sources |
Robert Phillips | 3674f58 | 2021-06-16 12:05:54 -0400 | [diff] [blame] | 1918 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1919 | deps = [ |
Mike Klein | e11e5c1 | 2019-04-24 12:46:06 -0500 | [diff] [blame] | 1920 | ":etc1", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 1921 | ":flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1922 | ":skia", |
| 1923 | ":tool_utils", |
Brian Osman | 84d884a | 2021-01-29 16:35:45 -0500 | [diff] [blame] | 1924 | "modules/particles", |
Mike Reed | 2f0edd5 | 2018-05-31 14:22:30 -0400 | [diff] [blame] | 1925 | "modules/skottie", |
Florin Malita | 2687072 | 2018-09-20 14:35:30 -0400 | [diff] [blame] | 1926 | "modules/skottie:gm", |
Mike Reed | 63559a5 | 2020-06-02 11:34:24 -0400 | [diff] [blame] | 1927 | "modules/skparagraph", |
| 1928 | "modules/skparagraph:gm", |
Brian Osman | c725e8f | 2019-04-10 14:08:44 -0400 | [diff] [blame] | 1929 | "modules/skshaper", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1930 | ] |
Mike Klein | c4abade | 2019-08-09 10:11:35 -0400 | [diff] [blame] | 1931 | if (is_skia_dev_build) { |
| 1932 | sources += [ "gm/fiddle.cpp" ] |
| 1933 | deps += [ ":skia.h" ] |
| 1934 | } |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 1935 | public_deps = [ ":gpu_tool_utils" ] |
Mike Reed | 7bf160e | 2019-05-17 16:50:51 -0400 | [diff] [blame] | 1936 | |
| 1937 | if (skia_use_ffmpeg) { |
Florin Malita | 123e3b8 | 2020-04-24 11:10:27 -0400 | [diff] [blame] | 1938 | deps += [ "experimental/ffmpeg:video_decoder" ] |
Mike Reed | 7bf160e | 2019-05-17 16:50:51 -0400 | [diff] [blame] | 1939 | sources += [ "gm/video_decoder.cpp" ] |
| 1940 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1941 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1942 | |
Ben Wagner | bded42a | 2021-02-17 22:14:34 -0500 | [diff] [blame] | 1943 | test_lib("test") { |
| 1944 | sources = [ |
| 1945 | "tests/Test.cpp", |
| 1946 | "tests/Test.h", |
| 1947 | "tests/TestUtils.cpp", |
| 1948 | "tests/TestUtils.h", |
| 1949 | ] |
| 1950 | deps = [ |
| 1951 | ":flags", |
| 1952 | ":skia", |
| 1953 | ":tool_utils", |
| 1954 | ] |
| 1955 | public_deps = [ |
| 1956 | ":gpu_tool_utils", # Test.h #includes headers from this target. |
| 1957 | ] |
| 1958 | } |
| 1959 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1960 | import("gn/tests.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1961 | test_lib("tests") { |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1962 | sources = tests_sources + pathops_tests_sources |
Chinmay Garde | 3ee25e9 | 2020-09-01 15:10:14 -0700 | [diff] [blame] | 1963 | frameworks = [] |
Robert Phillips | 0c6daf0 | 2019-05-16 12:43:11 -0400 | [diff] [blame] | 1964 | if (skia_use_metal) { |
| 1965 | sources += metal_tests_sources |
Jim Van Verth | 36b86af | 2020-08-24 17:16:46 +0000 | [diff] [blame] | 1966 | cflags_objcc = [ "-fobjc-arc" ] |
Chinmay Garde | 3ee25e9 | 2020-09-01 15:10:14 -0700 | [diff] [blame] | 1967 | frameworks += [ "MetalKit.framework" ] |
Robert Phillips | 0c6daf0 | 2019-05-16 12:43:11 -0400 | [diff] [blame] | 1968 | } |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 1969 | if (skia_use_gl) { |
| 1970 | sources += gl_tests_sources |
| 1971 | } |
Robert Phillips | 024668c | 2021-07-01 12:12:52 -0400 | [diff] [blame] | 1972 | if (!skia_enable_skgpu_v1) { |
| 1973 | sources -= skgpu_v1_tests_sources |
Robert Phillips | 1ca0da4 | 2021-06-14 15:27:19 -0400 | [diff] [blame] | 1974 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1975 | deps = [ |
| 1976 | ":flags", |
Ben Wagner | e75021e | 2021-02-17 22:18:34 -0500 | [diff] [blame] | 1977 | ":fontmgr_android_tests", |
| 1978 | ":fontmgr_fontconfig_tests", |
Ben Wagner | a3e5e55 | 2021-02-22 15:37:33 +0000 | [diff] [blame] | 1979 | ":fontmgr_mac_ct_tests", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1980 | ":skia", |
Ben Wagner | bded42a | 2021-02-17 22:14:34 -0500 | [diff] [blame] | 1981 | ":test", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1982 | ":tool_utils", |
Florin Malita | 26ae40f | 2020-06-08 12:03:48 -0400 | [diff] [blame] | 1983 | "experimental/skrive:tests", |
Florin Malita | 94d4d3e | 2018-06-18 13:10:51 -0400 | [diff] [blame] | 1984 | "modules/skottie:tests", |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 1985 | "modules/skparagraph:tests", |
Brian Osman | ccb8752 | 2018-06-01 19:20:00 +0000 | [diff] [blame] | 1986 | "modules/sksg:tests", |
Brian Osman | c725e8f | 2019-04-10 14:08:44 -0400 | [diff] [blame] | 1987 | "modules/skshaper", |
Florin Malita | dec7802 | 2020-12-17 16:36:54 -0500 | [diff] [blame] | 1988 | "modules/svg:tests", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1989 | "//third_party/libpng", |
Leon Scroggins III | 194580d | 2019-02-22 12:32:16 -0500 | [diff] [blame] | 1990 | "//third_party/libwebp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1991 | "//third_party/zlib", |
| 1992 | ] |
| 1993 | } |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 1994 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1995 | import("gn/bench.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1996 | test_lib("bench") { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1997 | sources = bench_sources |
Robert Phillips | 04f22ea | 2021-07-22 15:11:03 -0400 | [diff] [blame] | 1998 | if (!skia_enable_skgpu_v1) { |
| 1999 | sources -= skgpu_v1_bench_sources |
| 2000 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 2001 | deps = [ |
| 2002 | ":flags", |
| 2003 | ":gm", |
| 2004 | ":gpu_tool_utils", |
| 2005 | ":skia", |
| 2006 | ":tool_utils", |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 2007 | "modules/skparagraph:bench", |
Mike Reed | d62d406 | 2019-06-12 10:20:44 -0400 | [diff] [blame] | 2008 | "modules/skshaper", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 2009 | ] |
| 2010 | } |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 2011 | |
Mike Reed | d62d406 | 2019-06-12 10:20:44 -0400 | [diff] [blame] | 2012 | test_lib("experimental_xform") { |
| 2013 | sources = [ |
| 2014 | "experimental/xform/SkShape.cpp", |
| 2015 | "experimental/xform/SkXform.cpp", |
| 2016 | "experimental/xform/XContext.cpp", |
| 2017 | ] |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2018 | deps = [ ":skia" ] |
Mike Reed | d62d406 | 2019-06-12 10:20:44 -0400 | [diff] [blame] | 2019 | } |
| 2020 | |
Florin Malita | bfe876a | 2018-09-02 12:33:59 -0400 | [diff] [blame] | 2021 | if (is_linux || is_mac) { |
Florin Malita | 8b86811 | 2021-06-09 13:26:27 -0400 | [diff] [blame] | 2022 | if (skia_enable_skottie) { |
| 2023 | test_app("skottie_tool") { |
| 2024 | deps = [ "modules/skottie:tool" ] |
| 2025 | } |
Florin Malita | 79725d3 | 2018-06-05 16:16:57 -0400 | [diff] [blame] | 2026 | } |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2027 | test_app("svg_tool") { |
| 2028 | deps = [ "modules/svg:tool" ] |
| 2029 | } |
Florin Malita | 79725d3 | 2018-06-05 16:16:57 -0400 | [diff] [blame] | 2030 | } |
| 2031 | |
Hal Canary | 5b39dc8 | 2019-04-17 13:29:46 -0400 | [diff] [blame] | 2032 | test_app("make_skqp_model") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2033 | sources = [ "tools/skqp/make_skqp_model.cpp" ] |
| 2034 | deps = [ ":skia" ] |
Hal Canary | 5b39dc8 | 2019-04-17 13:29:46 -0400 | [diff] [blame] | 2035 | } |
| 2036 | |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2037 | import("gn/samples.gni") |
| 2038 | test_lib("samples") { |
| 2039 | sources = samples_sources |
Robert Phillips | 024668c | 2021-07-01 12:12:52 -0400 | [diff] [blame] | 2040 | if (!skia_enable_skgpu_v1) { |
| 2041 | sources -= skgpu_v1_samples_sources |
Robert Phillips | 3674f58 | 2021-06-16 12:05:54 -0400 | [diff] [blame] | 2042 | } |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2043 | public_deps = [ ":tool_utils" ] |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2044 | deps = [ |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2045 | ":flags", |
| 2046 | ":gpu_tool_utils", |
| 2047 | ":xml", |
Julia Lavrova | 159fd84 | 2021-02-24 12:15:08 -0500 | [diff] [blame] | 2048 | "experimental/sktext:samples", |
Jorge Betancourt | b862131 | 2020-09-10 15:16:35 -0400 | [diff] [blame] | 2049 | "modules/audioplayer", |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2050 | "modules/skparagraph:samples", |
| 2051 | "modules/skshaper", |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2052 | "modules/svg", |
Tyler Denniston | 189ecd4 | 2020-10-22 15:40:49 -0400 | [diff] [blame] | 2053 | "//third_party/imgui", |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2054 | ] |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2055 | } |
Kevin Lubick | 0039874 | 2020-10-08 10:05:07 -0400 | [diff] [blame] | 2056 | test_lib("hash_and_encode") { |
| 2057 | sources = [ |
| 2058 | "tools/HashAndEncode.cpp", |
| 2059 | "tools/HashAndEncode.h", |
| 2060 | ] |
| 2061 | deps = [ |
| 2062 | ":flags", |
| 2063 | ":skia", |
| 2064 | "//third_party/libpng", |
| 2065 | ] |
| 2066 | } |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2067 | if (target_cpu != "wasm") { |
Nigel Tao | 3ab9b1f | 2020-05-28 13:29:13 +1000 | [diff] [blame] | 2068 | test_app("convert-to-nia") { |
| 2069 | sources = [ "tools/convert-to-nia.cpp" ] |
| 2070 | deps = [ ":skia" ] |
| 2071 | } |
Mike Klein | 7af351a | 2018-07-27 09:54:43 -0400 | [diff] [blame] | 2072 | test_app("imgcvt") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2073 | sources = [ "tools/imgcvt.cpp" ] |
Mike Klein | 7af351a | 2018-07-27 09:54:43 -0400 | [diff] [blame] | 2074 | deps = [ |
| 2075 | ":skcms", |
| 2076 | ":skia", |
| 2077 | ] |
| 2078 | } |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 2079 | test_app("fm") { |
| 2080 | sources = [ |
Mike Klein | fee0079 | 2019-11-21 16:18:47 -0600 | [diff] [blame] | 2081 | "dm/DMGpuTestProcs.cpp", # blech |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 2082 | "tools/fm/fm.cpp", |
| 2083 | ] |
| 2084 | deps = [ |
| 2085 | ":common_flags_aa", |
| 2086 | ":common_flags_gpu", |
| 2087 | ":flags", |
| 2088 | ":gm", |
| 2089 | ":gpu_tool_utils", |
| 2090 | ":hash_and_encode", |
| 2091 | ":skia", |
Mike Klein | fee0079 | 2019-11-21 16:18:47 -0600 | [diff] [blame] | 2092 | ":tests", |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 2093 | ":tool_utils", |
| 2094 | ":trace", |
Mike Klein | 2292426 | 2019-04-02 14:14:56 -0400 | [diff] [blame] | 2095 | "modules/skottie", |
| 2096 | "modules/skottie:utils", |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2097 | "modules/svg", |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 2098 | ] |
| 2099 | } |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 2100 | test_app("dm") { |
| 2101 | sources = [ |
| 2102 | "dm/DM.cpp", |
Hal Canary | b6c5e5b | 2017-10-09 16:13:02 -0400 | [diff] [blame] | 2103 | "dm/DMGpuTestProcs.cpp", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 2104 | "dm/DMJsonWriter.cpp", |
John Stiles | 65ec198 | 2021-07-20 12:53:54 -0400 | [diff] [blame] | 2105 | "dm/DMJsonWriter.h", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 2106 | "dm/DMSrcSink.cpp", |
John Stiles | 65ec198 | 2021-07-20 12:53:54 -0400 | [diff] [blame] | 2107 | "dm/DMSrcSink.h", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 2108 | ] |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 2109 | deps = [ |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 2110 | ":common_flags_aa", |
| 2111 | ":common_flags_config", |
| 2112 | ":common_flags_gpu", |
| 2113 | ":common_flags_images", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 2114 | ":flags", |
| 2115 | ":gm", |
| 2116 | ":gpu_tool_utils", |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 2117 | ":hash_and_encode", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 2118 | ":skia", |
| 2119 | ":tests", |
| 2120 | ":tool_utils", |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 2121 | ":trace", |
Florin Malita | 02616ea | 2020-06-25 13:33:17 -0400 | [diff] [blame] | 2122 | "experimental/skrive", |
Florin Malita | 3d856bd | 2018-05-26 09:49:28 -0400 | [diff] [blame] | 2123 | "modules/skottie", |
Florin Malita | a831655 | 2018-11-09 16:19:44 -0500 | [diff] [blame] | 2124 | "modules/skottie:utils", |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2125 | "modules/svg", |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 2126 | ] |
| 2127 | } |
Robert Phillips | 4d45e09 | 2021-07-01 13:27:16 -0400 | [diff] [blame] | 2128 | test_app("sorttoy") { |
Robert Phillips | 4b73228 | 2021-05-20 09:45:10 -0400 | [diff] [blame] | 2129 | sources = [ |
Robert Phillips | 4d45e09 | 2021-07-01 13:27:16 -0400 | [diff] [blame] | 2130 | "experimental/sorttoy/Cmds.cpp", |
| 2131 | "experimental/sorttoy/Cmds.h", |
| 2132 | "experimental/sorttoy/Fake.cpp", |
| 2133 | "experimental/sorttoy/Fake.h", |
| 2134 | "experimental/sorttoy/SortKey.h", |
| 2135 | "experimental/sorttoy/sorttoy.cpp", |
| 2136 | "experimental/sorttoy/sorttypes.h", |
Robert Phillips | 4b73228 | 2021-05-20 09:45:10 -0400 | [diff] [blame] | 2137 | ] |
Robert Phillips | cd1e397 | 2021-02-22 17:24:22 -0500 | [diff] [blame] | 2138 | deps = [ |
| 2139 | ":flags", |
| 2140 | ":skia", |
| 2141 | ":tool_utils", |
| 2142 | ] |
| 2143 | } |
Michael Ludwig | 3021795 | 2020-12-04 12:58:35 -0500 | [diff] [blame] | 2144 | |
| 2145 | # optional separate library to dlopen when running CanvasStateTests. |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 2146 | skia_shared_library("canvas_state_lib") { |
Michael Ludwig | 3021795 | 2020-12-04 12:58:35 -0500 | [diff] [blame] | 2147 | sources = [ |
| 2148 | "tests/CanvasStateHelpers.cpp", |
| 2149 | "tests/CanvasStateHelpers.h", |
| 2150 | ] |
| 2151 | deps = [ ":skia" ] |
| 2152 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2153 | } |
| 2154 | |
Mike Klein | a8a51ce | 2018-01-09 12:34:11 -0500 | [diff] [blame] | 2155 | if (!is_win) { |
| 2156 | test_app("remote_demo") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2157 | sources = [ "tools/remote_demo.cpp" ] |
| 2158 | deps = [ ":skia" ] |
Mike Klein | a8a51ce | 2018-01-09 12:34:11 -0500 | [diff] [blame] | 2159 | } |
| 2160 | } |
| 2161 | |
Hal Canary | e107faa | 2019-10-23 12:52:33 -0400 | [diff] [blame] | 2162 | if (!is_win) { |
| 2163 | test_app("blob_cache_sim") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2164 | sources = [ "tools/blob_cache_sim.cpp" ] |
| 2165 | deps = [ ":skia" ] |
Hal Canary | e107faa | 2019-10-23 12:52:33 -0400 | [diff] [blame] | 2166 | } |
| 2167 | } |
| 2168 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2169 | test_app("nanobench") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2170 | sources = [ "bench/nanobench.cpp" ] |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 2171 | deps = [ |
| 2172 | ":bench", |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 2173 | ":common_flags_aa", |
| 2174 | ":common_flags_config", |
| 2175 | ":common_flags_gpu", |
| 2176 | ":common_flags_images", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 2177 | ":flags", |
| 2178 | ":gm", |
| 2179 | ":gpu_tool_utils", |
| 2180 | ":skia", |
| 2181 | ":tool_utils", |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 2182 | ":trace", |
Mike Reed | 63559a5 | 2020-06-02 11:34:24 -0400 | [diff] [blame] | 2183 | "modules/skparagraph", |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 2184 | "modules/skshaper", |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2185 | "modules/svg", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 2186 | ] |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 2187 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 2188 | |
Ravi Mistry | 10d36c5 | 2017-01-31 09:49:18 -0500 | [diff] [blame] | 2189 | test_app("skpinfo") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2190 | sources = [ "tools/skpinfo.cpp" ] |
Greg Daniel | 0eb35a9 | 2021-06-18 10:47:54 -0400 | [diff] [blame] | 2191 | configs = [ ":our_vulkan_headers" ] |
Ravi Mistry | 10d36c5 | 2017-01-31 09:49:18 -0500 | [diff] [blame] | 2192 | deps = [ |
| 2193 | ":flags", |
| 2194 | ":skia", |
| 2195 | ] |
| 2196 | } |
| 2197 | |
Mike Reed | c0ee21f | 2019-05-28 16:11:03 -0400 | [diff] [blame] | 2198 | if (skia_use_ffmpeg) { |
| 2199 | test_app("skottie2movie") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2200 | sources = [ "tools/skottie2movie.cpp" ] |
Mike Reed | c0ee21f | 2019-05-28 16:11:03 -0400 | [diff] [blame] | 2201 | deps = [ |
| 2202 | ":flags", |
Mike Reed | 5f12eaa | 2019-09-24 12:01:58 -0400 | [diff] [blame] | 2203 | ":gpu_tool_utils", |
Mike Reed | c0ee21f | 2019-05-28 16:11:03 -0400 | [diff] [blame] | 2204 | ":skia", |
Florin Malita | ec40360 | 2020-04-24 12:14:03 -0400 | [diff] [blame] | 2205 | "experimental/ffmpeg:video_encoder", |
Mike Reed | c0ee21f | 2019-05-28 16:11:03 -0400 | [diff] [blame] | 2206 | "modules/skottie", |
Mike Reed | 5093e23 | 2019-05-30 10:10:50 -0400 | [diff] [blame] | 2207 | "modules/skottie:utils", |
Mike Reed | c0ee21f | 2019-05-28 16:11:03 -0400 | [diff] [blame] | 2208 | ] |
| 2209 | } |
| 2210 | } |
| 2211 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2212 | test_app("skpbench") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2213 | sources = [ "tools/skpbench/skpbench.cpp" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2214 | deps = [ |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 2215 | ":common_flags_config", |
| 2216 | ":common_flags_gpu", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2217 | ":flags", |
| 2218 | ":gpu_tool_utils", |
| 2219 | ":skia", |
| 2220 | ":tool_utils", |
| 2221 | ] |
csmartdalton | 4b5179b | 2016-09-19 11:03:58 -0700 | [diff] [blame] | 2222 | } |
| 2223 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2224 | test_app("sktexttopdf") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2225 | sources = [ "tools/using_skia_and_harfbuzz.cpp" ] |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 2226 | deps = [ |
| 2227 | ":skia", |
Herb Derby | 264182c | 2018-05-29 15:53:40 -0400 | [diff] [blame] | 2228 | "modules/skshaper", |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 2229 | ] |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 2230 | } |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 2231 | |
Ben Wagner | 219f362 | 2017-07-17 15:32:25 -0400 | [diff] [blame] | 2232 | test_app("create_test_font") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2233 | sources = [ "tools/fonts/create_test_font.cpp" ] |
| 2234 | deps = [ ":skia" ] |
Ben Wagner | 219f362 | 2017-07-17 15:32:25 -0400 | [diff] [blame] | 2235 | assert_no_deps = [ |
| 2236 | # tool_utils requires the output of this app. |
| 2237 | ":tool_utils", |
| 2238 | ] |
| 2239 | } |
| 2240 | |
Florin Malita | 5d3ff43 | 2018-07-31 16:38:43 -0400 | [diff] [blame] | 2241 | if (skia_use_expat) { |
| 2242 | test_app("create_test_font_color") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2243 | sources = [ "tools/fonts/create_test_font_color.cpp" ] |
Florin Malita | 5d3ff43 | 2018-07-31 16:38:43 -0400 | [diff] [blame] | 2244 | deps = [ |
| 2245 | ":flags", |
| 2246 | ":skia", |
| 2247 | ":tool_utils", |
| 2248 | ] |
| 2249 | } |
Ben Wagner | 97182cc | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 2250 | } |
| 2251 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2252 | test_app("get_images_from_skps") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2253 | sources = [ "tools/get_images_from_skps.cpp" ] |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 2254 | deps = [ |
| 2255 | ":flags", |
| 2256 | ":skia", |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 2257 | ] |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 2258 | } |
mtklein | ecbc526 | 2016-09-22 11:51:24 -0700 | [diff] [blame] | 2259 | |
Brian Osman | 6788a54 | 2018-12-10 11:56:01 -0500 | [diff] [blame] | 2260 | if (!is_ios && target_cpu != "wasm" && !(is_win && target_cpu == "arm64")) { |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2261 | test_app("skiaserve") { |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2262 | sources = [ |
| 2263 | "tools/skiaserve/Request.cpp", |
| 2264 | "tools/skiaserve/Response.cpp", |
| 2265 | "tools/skiaserve/skiaserve.cpp", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2266 | "tools/skiaserve/urlhandlers/BreakHandler.cpp", |
| 2267 | "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp", |
| 2268 | "tools/skiaserve/urlhandlers/CmdHandler.cpp", |
| 2269 | "tools/skiaserve/urlhandlers/ColorModeHandler.cpp", |
| 2270 | "tools/skiaserve/urlhandlers/DataHandler.cpp", |
| 2271 | "tools/skiaserve/urlhandlers/DownloadHandler.cpp", |
| 2272 | "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp", |
| 2273 | "tools/skiaserve/urlhandlers/ImgHandler.cpp", |
| 2274 | "tools/skiaserve/urlhandlers/InfoHandler.cpp", |
Brian Salomon | 144a5c5 | 2016-12-20 16:48:59 -0500 | [diff] [blame] | 2275 | "tools/skiaserve/urlhandlers/OpBoundsHandler.cpp", |
| 2276 | "tools/skiaserve/urlhandlers/OpsHandler.cpp", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2277 | "tools/skiaserve/urlhandlers/OverdrawHandler.cpp", |
| 2278 | "tools/skiaserve/urlhandlers/PostHandler.cpp", |
| 2279 | "tools/skiaserve/urlhandlers/QuitHandler.cpp", |
| 2280 | "tools/skiaserve/urlhandlers/RootHandler.cpp", |
| 2281 | ] |
| 2282 | deps = [ |
| 2283 | ":flags", |
| 2284 | ":gpu_tool_utils", |
| 2285 | ":skia", |
| 2286 | ":tool_utils", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2287 | "//third_party/libmicrohttpd", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2288 | ] |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2289 | } |
mtklein | ecbc526 | 2016-09-22 11:51:24 -0700 | [diff] [blame] | 2290 | } |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2291 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2292 | test_app("fuzz") { |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2293 | sources = [ |
Kevin Lubick | bc9a1a8 | 2018-09-17 14:46:57 -0400 | [diff] [blame] | 2294 | "fuzz/Fuzz.cpp", |
John Stiles | 6d3996c | 2020-07-31 12:33:31 -0400 | [diff] [blame] | 2295 | "fuzz/Fuzz.h", |
Hal Canary | 24ac42b | 2017-02-14 13:35:14 -0500 | [diff] [blame] | 2296 | "fuzz/FuzzCanvas.cpp", |
Cary Clark | 91390c8 | 2018-03-09 14:02:46 -0500 | [diff] [blame] | 2297 | "fuzz/FuzzCommon.cpp", |
John Stiles | 6d3996c | 2020-07-31 12:33:31 -0400 | [diff] [blame] | 2298 | "fuzz/FuzzCommon.h", |
Zepeng Hu | 9400701 | 2020-07-22 14:37:46 +0000 | [diff] [blame] | 2299 | "fuzz/FuzzCreateDDL.cpp", |
Adlai Holler | ea8d197 | 2021-02-23 13:05:32 -0500 | [diff] [blame] | 2300 | "fuzz/FuzzDDLThreading.cpp", |
Kevin Lubick | fec1dea | 2016-11-22 13:57:18 -0500 | [diff] [blame] | 2301 | "fuzz/FuzzDrawFunctions.cpp", |
Kevin Lubick | e4be55d | 2018-03-30 15:05:13 -0400 | [diff] [blame] | 2302 | "fuzz/FuzzEncoders.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2303 | "fuzz/FuzzGradients.cpp", |
Kevin Lubick | bc9a1a8 | 2018-09-17 14:46:57 -0400 | [diff] [blame] | 2304 | "fuzz/FuzzMain.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2305 | "fuzz/FuzzParsePath.cpp", |
Cary Clark | 91390c8 | 2018-03-09 14:02:46 -0500 | [diff] [blame] | 2306 | "fuzz/FuzzPathMeasure.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2307 | "fuzz/FuzzPathop.cpp", |
Jim Van Verth | 061cc21 | 2018-07-11 14:09:09 -0400 | [diff] [blame] | 2308 | "fuzz/FuzzPolyUtils.cpp", |
Hal Canary | 13872dd | 2018-04-06 10:25:12 -0400 | [diff] [blame] | 2309 | "fuzz/FuzzRegionOp.cpp", |
Weston Tracey | 6d4577b | 2020-12-30 13:29:00 -0500 | [diff] [blame] | 2310 | "fuzz/FuzzSkParagraph.cpp", |
Robert Phillips | 98b066c | 2021-04-22 10:51:58 -0400 | [diff] [blame] | 2311 | "fuzz/FuzzTriangulation.cpp", |
Leon Scroggins III | 0b8fcbc | 2018-10-16 15:52:17 -0400 | [diff] [blame] | 2312 | "fuzz/oss_fuzz/FuzzAndroidCodec.cpp", |
Kevin Lubick | 2416f96 | 2018-02-12 08:26:39 -0500 | [diff] [blame] | 2313 | "fuzz/oss_fuzz/FuzzAnimatedImage.cpp", |
| 2314 | "fuzz/oss_fuzz/FuzzImage.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 2315 | "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp", |
Leon Scroggins III | 0b8fcbc | 2018-10-16 15:52:17 -0400 | [diff] [blame] | 2316 | "fuzz/oss_fuzz/FuzzIncrementalImage.cpp", |
Florin Malita | 80452be | 2018-06-19 11:27:20 -0400 | [diff] [blame] | 2317 | "fuzz/oss_fuzz/FuzzJSON.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 2318 | "fuzz/oss_fuzz/FuzzPathDeserialize.cpp", |
Kevin Lubick | 2541edf | 2018-01-11 10:27:14 -0500 | [diff] [blame] | 2319 | "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp", |
| 2320 | "fuzz/oss_fuzz/FuzzRegionSetPath.cpp", |
Zepeng Hu | fcb7ba0 | 2020-07-31 17:21:29 +0000 | [diff] [blame] | 2321 | "fuzz/oss_fuzz/FuzzSKP.cpp", |
Kevin Lubick | e9c1ce8 | 2019-03-11 11:09:40 -0400 | [diff] [blame] | 2322 | "fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp", |
| 2323 | "fuzz/oss_fuzz/FuzzSKSL2Metal.cpp", |
Kevin Lubick | 0f0a710 | 2019-03-18 16:20:55 -0400 | [diff] [blame] | 2324 | "fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp", |
Kevin Lubick | e9c1ce8 | 2019-03-11 11:09:40 -0400 | [diff] [blame] | 2325 | "fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp", |
Zepeng Hu | edaf302 | 2020-06-12 12:20:59 +0000 | [diff] [blame] | 2326 | "fuzz/oss_fuzz/FuzzSVG.cpp", |
Kevin Lubick | 2be14d3 | 2019-10-21 13:44:48 -0400 | [diff] [blame] | 2327 | "fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp", |
Weston Tracey | 1a771fe | 2021-02-04 11:09:59 -0500 | [diff] [blame] | 2328 | "fuzz/oss_fuzz/FuzzSkParagraph.cpp", |
Zepeng Hu | a5783f3 | 2020-07-10 13:36:20 +0000 | [diff] [blame] | 2329 | "fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 2330 | "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp", |
Kevin Lubick | 9ff5dc9 | 2018-01-09 12:47:33 -0500 | [diff] [blame] | 2331 | "tools/UrlDataManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 2332 | "tools/debugger/DebugCanvas.cpp", |
Nathaniel Nifong | 20b177a | 2019-12-12 11:05:10 -0500 | [diff] [blame] | 2333 | "tools/debugger/DebugLayerManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 2334 | "tools/debugger/DrawCommand.cpp", |
| 2335 | "tools/debugger/JsonWriteBuffer.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2336 | ] |
| 2337 | deps = [ |
| 2338 | ":flags", |
Hal Canary | 44801ca | 2017-03-15 11:39:06 -0400 | [diff] [blame] | 2339 | ":gpu_tool_utils", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2340 | ":skia", |
Florin Malita | 3d856bd | 2018-05-26 09:49:28 -0400 | [diff] [blame] | 2341 | "modules/skottie:fuzz", |
Weston Tracey | 6d4577b | 2020-12-30 13:29:00 -0500 | [diff] [blame] | 2342 | "modules/skparagraph", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2343 | ] |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2344 | } |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 2345 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2346 | test_app("pathops_unittest") { |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 2347 | sources = pathops_tests_sources + [ |
Mike Klein | 6e55fef | 2016-10-26 11:41:47 -0400 | [diff] [blame] | 2348 | rebase_path("tests/skia_test.cpp"), |
| 2349 | rebase_path("tests/Test.cpp"), |
| 2350 | ] |
caryclark | 9feb632 | 2016-10-25 08:58:26 -0700 | [diff] [blame] | 2351 | deps = [ |
| 2352 | ":flags", |
| 2353 | ":gpu_tool_utils", |
| 2354 | ":skia", |
| 2355 | ":tool_utils", |
| 2356 | ] |
caryclark | 9feb632 | 2016-10-25 08:58:26 -0700 | [diff] [blame] | 2357 | } |
| 2358 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2359 | test_app("dump_record") { |
Mike Klein | 4a56f4c | 2020-08-18 16:02:52 -0500 | [diff] [blame] | 2360 | sources = [ "tools/dump_record.cpp" ] |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 2361 | deps = [ |
| 2362 | ":flags", |
| 2363 | ":skia", |
| 2364 | ] |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 2365 | } |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 2366 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2367 | test_app("skdiff") { |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 2368 | sources = [ |
| 2369 | "tools/skdiff/skdiff.cpp", |
| 2370 | "tools/skdiff/skdiff_html.cpp", |
| 2371 | "tools/skdiff/skdiff_main.cpp", |
| 2372 | "tools/skdiff/skdiff_utils.cpp", |
| 2373 | ] |
| 2374 | deps = [ |
| 2375 | ":skia", |
| 2376 | ":tool_utils", |
| 2377 | ] |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 2378 | } |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2379 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2380 | test_app("skp_parser") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2381 | sources = [ "tools/skp_parser.cpp" ] |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2382 | deps = [ |
| 2383 | ":skia", |
| 2384 | ":tool_utils", |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2385 | ] |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2386 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2387 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2388 | if (!is_win) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 2389 | source_set("skqp_lib") { # Not a skia_source_set |
Colin Cross | 654eb2a | 2019-11-08 13:08:36 -0800 | [diff] [blame] | 2390 | check_includes = false |
| 2391 | testonly = true |
Colin Cross | 654eb2a | 2019-11-08 13:08:36 -0800 | [diff] [blame] | 2392 | public_configs = [ ":skia_private" ] |
Hal Canary | 0e07ad7 | 2018-02-08 13:06:56 -0500 | [diff] [blame] | 2393 | defines = |
| 2394 | [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ] |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2395 | sources = [ |
| 2396 | "dm/DMGpuTestProcs.cpp", |
Hal Canary | ac7f23c | 2018-11-26 14:07:41 -0500 | [diff] [blame] | 2397 | "tools/skqp/src/skqp.cpp", |
| 2398 | "tools/skqp/src/skqp_model.cpp", |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2399 | ] |
| 2400 | deps = [ |
| 2401 | ":gm", |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2402 | ":skia", |
| 2403 | ":tests", |
Hal Canary | d7b3845 | 2017-12-11 17:46:26 -0500 | [diff] [blame] | 2404 | ":tool_utils", |
| 2405 | ] |
| 2406 | } |
| 2407 | test_app("skqp") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2408 | sources = [ "tools/skqp/src/skqp_main.cpp" ] |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 2409 | include_dirs = [ "//" ] |
| 2410 | lib_dirs = [] |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2411 | deps = [ ":skqp_lib" ] |
Hal Canary | ac7f23c | 2018-11-26 14:07:41 -0500 | [diff] [blame] | 2412 | } |
| 2413 | test_app("jitter_gms") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2414 | sources = [ "tools/skqp/jitter_gms.cpp" ] |
Hal Canary | ac7f23c | 2018-11-26 14:07:41 -0500 | [diff] [blame] | 2415 | deps = [ |
| 2416 | ":gm", |
| 2417 | ":skia", |
| 2418 | ":skqp_lib", |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2419 | ] |
| 2420 | } |
| 2421 | } |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 2422 | if (is_fuchsia) { |
| 2423 | # Build a package repository for skqp on Fuchsia. |
| 2424 | group("skqp_repo") { |
| 2425 | testonly = true |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2426 | deps = [ "//build/fuchsia/skqp:skqp_repo" ] |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 2427 | } |
| 2428 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2429 | if (is_android) { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 2430 | shared_library("libskqp_app") { # Not a skia_shared_library |
Colin Cross | 654eb2a | 2019-11-08 13:08:36 -0800 | [diff] [blame] | 2431 | configs += [ ":skia_private" ] |
Colin Cross | 654eb2a | 2019-11-08 13:08:36 -0800 | [diff] [blame] | 2432 | testonly = true |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2433 | sources = [ "tools/skqp/src/jni_skqp.cpp" ] |
Hal Canary | 28f8938 | 2017-12-12 09:42:14 -0500 | [diff] [blame] | 2434 | deps = [ |
| 2435 | ":skia", |
| 2436 | ":skqp_lib", |
Hal Canary | b4d01a9 | 2018-01-29 13:10:08 -0500 | [diff] [blame] | 2437 | ":tool_utils", |
Hal Canary | 28f8938 | 2017-12-12 09:42:14 -0500 | [diff] [blame] | 2438 | ] |
| 2439 | libs = [ "android" ] |
| 2440 | } |
| 2441 | } |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2442 | if (is_android && skia_use_gl) { |
Stan Iliev | 9315172 | 2018-08-02 11:10:52 -0400 | [diff] [blame] | 2443 | test_app("skottie_android") { |
| 2444 | is_shared_library = true |
| 2445 | |
Jorge Betancourt | 1fcdcaa | 2020-06-22 14:14:32 +0000 | [diff] [blame] | 2446 | sources = [ "platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp" ] |
Stan Iliev | 9315172 | 2018-08-02 11:10:52 -0400 | [diff] [blame] | 2447 | libs = [] |
| 2448 | |
Stan Iliev | 9315172 | 2018-08-02 11:10:52 -0400 | [diff] [blame] | 2449 | deps = [ |
| 2450 | ":skia", |
| 2451 | "modules/skottie", |
| 2452 | ] |
| 2453 | } |
Jorge Betancourt | 265e3e1 | 2021-04-08 15:27:13 -0400 | [diff] [blame] | 2454 | |
| 2455 | test_app("androidkit") { |
| 2456 | is_shared_library = true |
| 2457 | |
Florin Malita | 2a650cc | 2021-04-12 13:38:44 -0400 | [diff] [blame] | 2458 | sources = [ |
Florin Malita | 8bad8f7 | 2021-04-13 10:05:27 -0400 | [diff] [blame] | 2459 | "modules/androidkit/src/AndroidKit.cpp", |
Florin Malita | 2a650cc | 2021-04-12 13:38:44 -0400 | [diff] [blame] | 2460 | "modules/androidkit/src/Canvas.cpp", |
Florin Malita | 1df8756 | 2021-06-28 16:34:14 -0400 | [diff] [blame] | 2461 | "modules/androidkit/src/ColorFilters.cpp", |
Jorge Betancourt | 151a6f3 | 2021-09-07 16:50:21 -0400 | [diff] [blame] | 2462 | "modules/androidkit/src/Font.cpp", |
Florin Malita | ca8191b | 2021-06-17 14:05:57 -0400 | [diff] [blame] | 2463 | "modules/androidkit/src/Gradients.cpp", |
Florin Malita | 934c021 | 2021-05-20 12:23:42 -0400 | [diff] [blame] | 2464 | "modules/androidkit/src/Image.cpp", |
Jorge Betancourt | f961bc2 | 2021-06-04 16:34:02 -0400 | [diff] [blame] | 2465 | "modules/androidkit/src/ImageFilter.cpp", |
Jorge Betancourt | 5cddd7f | 2021-04-29 13:33:50 -0400 | [diff] [blame] | 2466 | "modules/androidkit/src/Matrix.cpp", |
Florin Malita | de89bf0 | 2021-04-13 11:06:43 -0400 | [diff] [blame] | 2467 | "modules/androidkit/src/Paint.cpp", |
Jorge Betancourt | cfa4774 | 2021-06-16 14:45:52 -0400 | [diff] [blame] | 2468 | "modules/androidkit/src/Path.cpp", |
| 2469 | "modules/androidkit/src/PathBuilder.cpp", |
Florin Malita | 05bb5a8 | 2021-04-22 09:37:50 -0400 | [diff] [blame] | 2470 | "modules/androidkit/src/RuntimeShaderBuilder.cpp", |
| 2471 | "modules/androidkit/src/Shader.cpp", |
Florin Malita | 5e8d88e | 2021-05-18 09:54:10 -0400 | [diff] [blame] | 2472 | "modules/androidkit/src/SkottieAnimation.cpp", |
Florin Malita | 2a650cc | 2021-04-12 13:38:44 -0400 | [diff] [blame] | 2473 | "modules/androidkit/src/Surface.cpp", |
Jorge Betancourt | e3f8030 | 2021-05-13 11:24:37 -0400 | [diff] [blame] | 2474 | "modules/androidkit/src/Surface.h", |
Jorge Betancourt | f102b88 | 2021-04-26 13:48:56 -0400 | [diff] [blame] | 2475 | "modules/androidkit/src/SurfaceThread.cpp", |
| 2476 | "modules/androidkit/src/SurfaceThread.h", |
Jorge Betancourt | e1fb47d | 2021-08-20 14:37:13 -0400 | [diff] [blame] | 2477 | "modules/androidkit/src/Text.cpp", |
Florin Malita | 50cc5d4 | 2021-05-21 08:23:32 -0400 | [diff] [blame] | 2478 | "modules/androidkit/src/Utils.cpp", |
Florin Malita | 2a650cc | 2021-04-12 13:38:44 -0400 | [diff] [blame] | 2479 | ] |
Jorge Betancourt | f102b88 | 2021-04-26 13:48:56 -0400 | [diff] [blame] | 2480 | libs = [ |
| 2481 | "android", |
| 2482 | "jnigraphics", |
| 2483 | ] |
Jorge Betancourt | 265e3e1 | 2021-04-08 15:27:13 -0400 | [diff] [blame] | 2484 | |
Florin Malita | 2cc6538 | 2021-04-26 21:59:35 -0400 | [diff] [blame] | 2485 | deps = [ |
| 2486 | ":sk_app", |
| 2487 | ":skia", |
Jorge Betancourt | e1fb47d | 2021-08-20 14:37:13 -0400 | [diff] [blame] | 2488 | "experimental/sktext:sktext", |
Florin Malita | 5e8d88e | 2021-05-18 09:54:10 -0400 | [diff] [blame] | 2489 | "modules/skottie:skottie", |
Florin Malita | 2cc6538 | 2021-04-26 21:59:35 -0400 | [diff] [blame] | 2490 | ] |
Jorge Betancourt | 265e3e1 | 2021-04-08 15:27:13 -0400 | [diff] [blame] | 2491 | } |
Stan Iliev | 9315172 | 2018-08-02 11:10:52 -0400 | [diff] [blame] | 2492 | } |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2493 | |
Hal Canary | a9de760 | 2018-01-19 13:08:23 -0500 | [diff] [blame] | 2494 | test_app("list_gms") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2495 | sources = [ "tools/list_gms.cpp" ] |
Hal Canary | a9de760 | 2018-01-19 13:08:23 -0500 | [diff] [blame] | 2496 | deps = [ |
| 2497 | ":gm", |
| 2498 | ":skia", |
| 2499 | ] |
| 2500 | } |
| 2501 | test_app("list_gpu_unit_tests") { |
| 2502 | sources = [ |
| 2503 | "dm/DMGpuTestProcs.cpp", |
| 2504 | "tools/list_gpu_unit_tests.cpp", |
| 2505 | ] |
| 2506 | deps = [ |
| 2507 | ":skia", |
| 2508 | ":tests", |
| 2509 | ] |
| 2510 | } |
| 2511 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2512 | test_lib("sk_app") { |
Hal Canary | 378be8d | 2019-04-26 08:20:14 -0400 | [diff] [blame] | 2513 | public_deps = [ |
Hal Canary | 378be8d | 2019-04-26 08:20:14 -0400 | [diff] [blame] | 2514 | ":gpu_tool_utils", |
Hal Canary | 0569447 | 2019-05-03 17:14:21 -0400 | [diff] [blame] | 2515 | ":skia", |
Hal Canary | 378be8d | 2019-04-26 08:20:14 -0400 | [diff] [blame] | 2516 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2517 | sources = [ |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2518 | "tools/sk_app/Application.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2519 | "tools/sk_app/CommandSet.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2520 | "tools/sk_app/CommandSet.h", |
| 2521 | "tools/sk_app/DisplayParams.h", |
| 2522 | "tools/sk_app/RasterWindowContext.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2523 | "tools/sk_app/Window.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2524 | "tools/sk_app/Window.h", |
Robert Phillips | ed65339 | 2020-07-10 13:55:21 -0400 | [diff] [blame] | 2525 | "tools/sk_app/WindowContext.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2526 | "tools/sk_app/WindowContext.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2527 | ] |
| 2528 | libs = [] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 2529 | frameworks = [] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2530 | |
| 2531 | if (is_android) { |
| 2532 | sources += [ |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2533 | "tools/sk_app/android/RasterWindowContext_android.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2534 | "tools/sk_app/android/WindowContextFactory_android.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2535 | "tools/sk_app/android/Window_android.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2536 | "tools/sk_app/android/Window_android.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2537 | "tools/sk_app/android/main_android.cpp", |
| 2538 | "tools/sk_app/android/surface_glue_android.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2539 | "tools/sk_app/android/surface_glue_android.h", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2540 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2541 | libs += [ "android" ] |
| 2542 | } else if (is_linux) { |
| 2543 | sources += [ |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2544 | "tools/sk_app/unix/RasterWindowContext_unix.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2545 | "tools/sk_app/unix/WindowContextFactory_unix.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2546 | "tools/sk_app/unix/Window_unix.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2547 | "tools/sk_app/unix/Window_unix.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2548 | "tools/sk_app/unix/keysym2ucs.c", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2549 | "tools/sk_app/unix/keysym2ucs.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2550 | "tools/sk_app/unix/main_unix.cpp", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2551 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2552 | libs += [ |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2553 | "GL", # Used by raster window context, so cannot be behind skia_use_gl. |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2554 | "X11", |
| 2555 | ] |
| 2556 | } else if (is_win) { |
| 2557 | sources += [ |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2558 | "tools/sk_app/win/RasterWindowContext_win.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2559 | "tools/sk_app/win/WindowContextFactory_win.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2560 | "tools/sk_app/win/Window_win.cpp", |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2561 | "tools/sk_app/win/Window_win.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2562 | "tools/sk_app/win/main_win.cpp", |
| 2563 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2564 | } else if (is_mac) { |
| 2565 | sources += [ |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2566 | "tools/sk_app/mac/WindowContextFactory_mac.h", |
| 2567 | "tools/sk_app/mac/Window_mac.h", |
Jim Van Verth | 1f086ca | 2019-01-28 14:46:04 -0500 | [diff] [blame] | 2568 | "tools/sk_app/mac/Window_mac.mm", |
| 2569 | "tools/sk_app/mac/main_mac.mm", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2570 | ] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 2571 | frameworks += [ |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2572 | "QuartzCore.framework", |
| 2573 | "Cocoa.framework", |
| 2574 | "Foundation.framework", |
| 2575 | ] |
| 2576 | } else if (is_ios) { |
| 2577 | sources += [ |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2578 | "tools/sk_app/ios/WindowContextFactory_ios.h", |
| 2579 | "tools/sk_app/ios/Window_ios.h", |
Jim Van Verth | 68cb8b0 | 2019-08-29 14:59:17 -0400 | [diff] [blame] | 2580 | "tools/sk_app/ios/Window_ios.mm", |
| 2581 | "tools/sk_app/ios/main_ios.mm", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2582 | ] |
Jim Van Verth | ef820be | 2020-08-12 10:45:00 -0400 | [diff] [blame] | 2583 | frameworks += [ "QuartzCore.framework" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2584 | } |
| 2585 | |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2586 | if (skia_use_gl) { |
| 2587 | sources += [ "tools/sk_app/GLWindowContext.cpp" ] |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2588 | sources += [ "tools/sk_app/GLWindowContext.h" ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2589 | if (is_android) { |
| 2590 | sources += [ "tools/sk_app/android/GLWindowContext_android.cpp" ] |
| 2591 | } else if (is_linux) { |
| 2592 | sources += [ "tools/sk_app/unix/GLWindowContext_unix.cpp" ] |
| 2593 | } else if (is_win) { |
| 2594 | sources += [ "tools/sk_app/win/GLWindowContext_win.cpp" ] |
| 2595 | if (skia_use_angle) { |
| 2596 | sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ] |
| 2597 | } |
| 2598 | } else if (is_mac) { |
Ben Wagner | f6cc858 | 2021-04-19 14:12:12 +0000 | [diff] [blame] | 2599 | sources += [ |
| 2600 | "tools/sk_app/mac/GLWindowContext_mac.mm", |
| 2601 | "tools/sk_app/mac/RasterWindowContext_mac.mm", |
| 2602 | ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2603 | } else if (is_ios) { |
Ben Wagner | f6cc858 | 2021-04-19 14:12:12 +0000 | [diff] [blame] | 2604 | sources += [ |
| 2605 | "tools/sk_app/ios/GLWindowContext_ios.mm", |
| 2606 | "tools/sk_app/ios/RasterWindowContext_ios.mm", |
| 2607 | ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2608 | } |
| 2609 | } |
| 2610 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2611 | if (skia_use_vulkan) { |
| 2612 | sources += [ "tools/sk_app/VulkanWindowContext.cpp" ] |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2613 | sources += [ "tools/sk_app/VulkanWindowContext.h" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2614 | if (is_android) { |
| 2615 | sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ] |
| 2616 | } else if (is_linux) { |
| 2617 | sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ] |
| 2618 | libs += [ "X11-xcb" ] |
| 2619 | } else if (is_win) { |
| 2620 | sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ] |
| 2621 | } |
| 2622 | } |
| 2623 | |
Jim Van Verth | be39f71 | 2019-02-08 15:36:14 -0500 | [diff] [blame] | 2624 | if (skia_use_metal) { |
| 2625 | sources += [ "tools/sk_app/MetalWindowContext.mm" ] |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2626 | sources += [ "tools/sk_app/MetalWindowContext.h" ] |
Jim Van Verth | be39f71 | 2019-02-08 15:36:14 -0500 | [diff] [blame] | 2627 | if (is_mac) { |
| 2628 | sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ] |
Jim Van Verth | 68cb8b0 | 2019-08-29 14:59:17 -0400 | [diff] [blame] | 2629 | } else if (is_ios) { |
Jim Van Verth | e58d532 | 2019-09-03 09:42:57 -0400 | [diff] [blame] | 2630 | sources += [ "tools/sk_app/ios/MetalWindowContext_ios.mm" ] |
Jim Van Verth | be39f71 | 2019-02-08 15:36:14 -0500 | [diff] [blame] | 2631 | } |
Jim Van Verth | be39f71 | 2019-02-08 15:36:14 -0500 | [diff] [blame] | 2632 | } |
| 2633 | |
Jim Van Verth | 682a2f4 | 2020-05-13 16:54:09 -0400 | [diff] [blame] | 2634 | if (skia_use_direct3d) { |
| 2635 | sources += [ "tools/sk_app/win/D3D12WindowContext_win.cpp" ] |
| 2636 | } |
| 2637 | |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2638 | if (skia_use_dawn) { |
| 2639 | sources += [ "tools/sk_app/DawnWindowContext.cpp" ] |
John Stiles | ab9578e | 2020-06-30 17:36:55 -0400 | [diff] [blame] | 2640 | sources += [ "tools/sk_app/DawnWindowContext.h" ] |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2641 | if (is_linux) { |
| 2642 | if (dawn_enable_vulkan) { |
| 2643 | sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ] |
| 2644 | defines = [ "VK_USE_PLATFORM_XCB_KHR" ] |
| 2645 | libs += [ "X11-xcb" ] |
| 2646 | } |
| 2647 | } else if (is_win) { |
| 2648 | if (dawn_enable_d3d12) { |
| 2649 | sources += [ "tools/sk_app/win/DawnD3D12WindowContext_win.cpp" ] |
| 2650 | } |
| 2651 | } else if (is_mac) { |
| 2652 | if (dawn_enable_metal) { |
| 2653 | sources += [ "tools/sk_app/mac/DawnMTLWindowContext_mac.mm" ] |
| 2654 | } |
| 2655 | } |
| 2656 | } |
| 2657 | |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2658 | deps = [ ":tool_utils" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2659 | if (is_android) { |
| 2660 | deps += [ "//third_party/native_app_glue" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2661 | } |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2662 | if (skia_use_gl && skia_use_angle) { |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2663 | deps += [ "//third_party/angle2" ] |
Mike Klein | a92c383 | 2016-12-08 09:49:39 -0500 | [diff] [blame] | 2664 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2665 | } |
Ethan Nicholas | 4f3985c | 2016-11-14 11:16:37 -0500 | [diff] [blame] | 2666 | |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2667 | if (!skia_use_vulkan && (is_mac || is_linux || is_win)) { |
| 2668 | test_app("fiddle_examples") { |
| 2669 | sources = [ |
Brian Osman | c725e8f | 2019-04-10 14:08:44 -0400 | [diff] [blame] | 2670 | "tools/fiddle/all_examples.cpp", |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2671 | "tools/fiddle/examples.cpp", |
Brian Osman | 72ef2d5 | 2019-03-17 11:09:17 -0400 | [diff] [blame] | 2672 | "tools/fiddle/examples.h", |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2673 | ] |
Brian Osman | 72ef2d5 | 2019-03-17 11:09:17 -0400 | [diff] [blame] | 2674 | if (is_win) { |
Hal Canary | 6c8422c | 2020-01-10 15:22:09 -0500 | [diff] [blame] | 2675 | cflags = [ |
| 2676 | "/wd4756", # Overflow in constant arithmetic |
| 2677 | "/wd4305", # truncation from 'double' to 'float' |
| 2678 | ] |
Brian Osman | 72ef2d5 | 2019-03-17 11:09:17 -0400 | [diff] [blame] | 2679 | } |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2680 | deps = [ |
| 2681 | ":skia", |
| 2682 | ":skia.h", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 2683 | "modules/particles", |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2684 | "modules/skottie", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 2685 | "modules/skparagraph", |
Florin Malita | a1dcaae | 2019-03-25 17:38:43 -0400 | [diff] [blame] | 2686 | "modules/skshaper", |
Joe Gregorio | 7ae1b4c | 2020-12-28 14:37:39 -0500 | [diff] [blame] | 2687 | "modules/svg", |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2688 | ] |
| 2689 | } |
| 2690 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2691 | |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2692 | # sk_app can work without GL but viewer always runs raster through a GL window context. |
| 2693 | if (skia_use_gl) { |
| 2694 | test_app("viewer") { |
| 2695 | is_shared_library = is_android |
| 2696 | sources = [ |
| 2697 | "tools/viewer/AnimTimer.h", |
| 2698 | "tools/viewer/BisectSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2699 | "tools/viewer/BisectSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2700 | "tools/viewer/GMSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2701 | "tools/viewer/GMSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2702 | "tools/viewer/ImGuiLayer.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2703 | "tools/viewer/ImGuiLayer.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2704 | "tools/viewer/ImageSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2705 | "tools/viewer/ImageSlide.h", |
Brian Salomon | 06c9e29 | 2021-04-29 14:10:23 -0400 | [diff] [blame] | 2706 | "tools/viewer/MSKPSlide.cpp", |
| 2707 | "tools/viewer/MSKPSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2708 | "tools/viewer/ParticlesSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2709 | "tools/viewer/ParticlesSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2710 | "tools/viewer/SKPSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2711 | "tools/viewer/SKPSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2712 | "tools/viewer/SampleSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2713 | "tools/viewer/SampleSlide.h", |
Florin Malita | 45cd200 | 2020-06-09 14:00:54 -0400 | [diff] [blame] | 2714 | "tools/viewer/SkRiveSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2715 | "tools/viewer/SkRiveSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2716 | "tools/viewer/SkSLSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2717 | "tools/viewer/SkSLSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2718 | "tools/viewer/SkottieSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2719 | "tools/viewer/SkottieSlide.h", |
| 2720 | "tools/viewer/Slide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2721 | "tools/viewer/SlideDir.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2722 | "tools/viewer/SlideDir.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2723 | "tools/viewer/StatsLayer.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2724 | "tools/viewer/StatsLayer.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2725 | "tools/viewer/SvgSlide.cpp", |
Ben Wagner | fa8b5e4 | 2021-01-28 14:30:59 -0500 | [diff] [blame] | 2726 | "tools/viewer/SvgSlide.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2727 | "tools/viewer/TouchGesture.cpp", |
| 2728 | "tools/viewer/TouchGesture.h", |
| 2729 | "tools/viewer/Viewer.cpp", |
John Stiles | 6d3996c | 2020-07-31 12:33:31 -0400 | [diff] [blame] | 2730 | "tools/viewer/Viewer.h", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2731 | ] |
| 2732 | libs = [] |
| 2733 | |
| 2734 | deps = [ |
| 2735 | ":common_flags_gpu", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2736 | ":flags", |
| 2737 | ":gm", |
| 2738 | ":gpu_tool_utils", |
| 2739 | ":samples", |
| 2740 | ":sk_app", |
| 2741 | ":skia", |
| 2742 | ":tool_utils", |
| 2743 | ":trace", |
Florin Malita | 45cd200 | 2020-06-09 14:00:54 -0400 | [diff] [blame] | 2744 | "experimental/skrive", |
Julia Lavrova | 159fd84 | 2021-02-24 12:15:08 -0500 | [diff] [blame] | 2745 | "experimental/sktext", |
Florin Malita | c9c4e2e | 2020-08-13 12:03:37 -0400 | [diff] [blame] | 2746 | "modules/audioplayer", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2747 | "modules/particles", |
| 2748 | "modules/skottie", |
| 2749 | "modules/skottie:utils", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2750 | "modules/sksg:samples", |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2751 | "modules/svg", |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2752 | "//third_party/imgui", |
| 2753 | ] |
| 2754 | if (skia_use_experimental_xform) { |
| 2755 | deps += [ ":experimental_xform" ] |
| 2756 | sources += [ "gm/xform.cpp" ] |
| 2757 | } |
Brian Osman | c85f1fa | 2020-06-16 15:11:34 -0400 | [diff] [blame] | 2758 | if (skia_use_vulkan) { |
Brian Salomon | 3207fbe | 2020-06-30 11:09:25 -0400 | [diff] [blame] | 2759 | deps += [ |
Corentin Wallez | 89d6e79 | 2021-03-08 15:25:34 +0100 | [diff] [blame] | 2760 | "//third_party/externals/spirv-tools:spvtools", |
Brian Salomon | 3207fbe | 2020-06-30 11:09:25 -0400 | [diff] [blame] | 2761 | |
Corentin Wallez | 89d6e79 | 2021-03-08 15:25:34 +0100 | [diff] [blame] | 2762 | #spvtools depends on this but doesn't deps it in. |
| 2763 | "//third_party/externals/spirv-tools:spvtools_val", |
Brian Salomon | 3207fbe | 2020-06-30 11:09:25 -0400 | [diff] [blame] | 2764 | ] |
Brian Osman | c85f1fa | 2020-06-16 15:11:34 -0400 | [diff] [blame] | 2765 | } |
Mike Reed | d62d406 | 2019-06-12 10:20:44 -0400 | [diff] [blame] | 2766 | } |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2767 | } |
| 2768 | |
Brian Salomon | f4ba4ec | 2020-03-19 15:54:28 -0400 | [diff] [blame] | 2769 | if (skia_use_gl && !skia_use_angle && (is_linux || is_win || is_mac)) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2770 | test_app("HelloWorld") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2771 | sources = [ "example/HelloWorld.cpp" ] |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2772 | libs = [] |
| 2773 | |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2774 | deps = [ |
| 2775 | ":flags", |
| 2776 | ":gpu_tool_utils", |
| 2777 | ":sk_app", |
| 2778 | ":skia", |
| 2779 | ":tool_utils", |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2780 | ] |
| 2781 | } |
| 2782 | } |
| 2783 | |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2784 | if (skia_qt_path != "" && (is_win || is_linux || is_mac)) { |
| 2785 | action_foreach("generate_mocs") { |
| 2786 | script = "gn/call.py" |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2787 | sources = [ "tools/mdbviz/MainWindow.h" ] |
| 2788 | outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp" ] |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2789 | args = [ |
| 2790 | "$skia_qt_path" + "/bin/moc", |
| 2791 | "{{source}}", |
| 2792 | "-o", |
| 2793 | "gen/mdbviz/{{source_name_part}}_moc.cpp", |
| 2794 | ] |
| 2795 | } |
| 2796 | action_foreach("generate_resources") { |
| 2797 | script = "gn/call.py" |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2798 | sources = [ "tools/mdbviz/resources.qrc" ] |
| 2799 | outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp" ] |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2800 | args = [ |
| 2801 | "$skia_qt_path" + "/bin/rcc", |
| 2802 | "{{source}}", |
| 2803 | "-o", |
| 2804 | "gen/mdbviz/{{source_name_part}}_res.cpp", |
| 2805 | ] |
| 2806 | } |
| 2807 | test_app("mdbviz") { |
| 2808 | if (is_win) { |
| 2809 | # on Windows we need to disable some exception handling warnings due to the Qt headers |
| 2810 | cflags = [ "/Wv:18" ] # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017 |
| 2811 | } |
| 2812 | sources = [ |
Robert Phillips | 5fccf9d | 2017-09-05 15:10:12 -0400 | [diff] [blame] | 2813 | "tools/UrlDataManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 2814 | "tools/debugger/DebugCanvas.cpp", |
Nathaniel Nifong | 20b177a | 2019-12-12 11:05:10 -0500 | [diff] [blame] | 2815 | "tools/debugger/DebugLayerManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 2816 | "tools/debugger/DrawCommand.cpp", |
| 2817 | "tools/debugger/JsonWriteBuffer.cpp", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2818 | "tools/mdbviz/MainWindow.cpp", |
Robert Phillips | deaf568 | 2017-09-06 13:07:21 -0400 | [diff] [blame] | 2819 | "tools/mdbviz/Model.cpp", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2820 | "tools/mdbviz/main.cpp", |
| 2821 | |
| 2822 | # generated files |
| 2823 | "$target_gen_dir/mdbviz/MainWindow_moc.cpp", |
| 2824 | "$target_gen_dir/mdbviz/resources_res.cpp", |
| 2825 | ] |
| 2826 | lib_dirs = [ "$skia_qt_path/lib" ] |
| 2827 | libs = [ |
| 2828 | "Qt5Core.lib", |
| 2829 | "Qt5Gui.lib", |
| 2830 | "Qt5Widgets.lib", |
| 2831 | ] |
| 2832 | include_dirs = [ |
| 2833 | "$skia_qt_path/include", |
Robert Phillips | 276066b | 2017-09-06 17:17:44 -0400 | [diff] [blame] | 2834 | "$skia_qt_path/include/QtCore", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2835 | "$skia_qt_path/include/QtWidgets", |
| 2836 | ] |
| 2837 | deps = [ |
| 2838 | ":generate_mocs", |
| 2839 | ":generate_resources", |
| 2840 | ":skia", |
| 2841 | ] |
| 2842 | } |
| 2843 | } |
| 2844 | |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 2845 | if (is_android && defined(ndk) && ndk != "") { |
Derek Sollenberger | 70120c7 | 2017-01-05 11:39:04 -0500 | [diff] [blame] | 2846 | copy("gdbserver") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2847 | sources = [ "$ndk/$ndk_gdbserver" ] |
| 2848 | outputs = [ "$root_out_dir/gdbserver" ] |
Derek Sollenberger | 70120c7 | 2017-01-05 11:39:04 -0500 | [diff] [blame] | 2849 | } |
Derek Sollenberger | 70120c7 | 2017-01-05 11:39:04 -0500 | [diff] [blame] | 2850 | } |
Mike Klein | f9ae670 | 2018-06-20 14:05:05 -0400 | [diff] [blame] | 2851 | |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 2852 | skia_executable("cpu_modules") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2853 | sources = [ "tools/cpu_modules.cpp" ] |
Brian Osman | f564f15 | 2019-07-23 15:14:30 -0400 | [diff] [blame] | 2854 | deps = [ |
| 2855 | ":skia", |
| 2856 | "modules/particles", |
| 2857 | ] |
| 2858 | } |
| 2859 | |
Ben Wagner | f6cc858 | 2021-04-19 14:12:12 +0000 | [diff] [blame] | 2860 | if (skia_use_icu && skia_use_harfbuzz) { |
Hal Canary | 1f94d39 | 2019-07-30 09:27:56 -0400 | [diff] [blame] | 2861 | test_app("editor") { |
| 2862 | is_shared_library = is_android |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2863 | deps = [ "modules/skplaintexteditor:editor_app" ] |
Hal Canary | 1f94d39 | 2019-07-30 09:27:56 -0400 | [diff] [blame] | 2864 | } |
Julia Lavrova | ecc8e3b | 2021-06-10 10:26:36 -0400 | [diff] [blame] | 2865 | test_app("text_editor") { |
| 2866 | is_shared_library = is_android |
| 2867 | deps = [ "experimental/sktext:text_editor" ] |
| 2868 | } |
Hal Canary | b8f81af | 2019-04-24 13:56:16 -0400 | [diff] [blame] | 2869 | } |
Hal Canary | e5b65d2 | 2019-09-19 11:33:31 -0400 | [diff] [blame] | 2870 | |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 2871 | skia_executable("image_diff_metric") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 2872 | sources = [ "tools/image_diff_metric.cpp" ] |
| 2873 | deps = [ ":skia" ] |
Hal Canary | e5b65d2 | 2019-09-19 11:33:31 -0400 | [diff] [blame] | 2874 | } |
Chris Dalton | 2b59890 | 2020-03-25 10:50:35 -0600 | [diff] [blame] | 2875 | |
| 2876 | group("modules_testonly") { |
| 2877 | testonly = true |
| 2878 | deps = [] |
| 2879 | if (target_cpu == "wasm") { |
| 2880 | deps += [ "modules/canvaskit:viewer_wasm" ] |
| 2881 | } |
| 2882 | } |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 2883 | |
| 2884 | if (skia_build_fuzzers) { |
| 2885 | template("libfuzzer_app") { |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 2886 | skia_executable(target_name) { |
| 2887 | output_dir = root_build_dir |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 2888 | check_includes = false |
| 2889 | forward_variables_from(invoker, "*", [ "is_shared_library" ]) |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 2890 | if (!defined(configs)) { |
| 2891 | configs = [] |
| 2892 | } |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 2893 | configs += [ ":skia_private" ] |
| 2894 | sources += [ |
| 2895 | "fuzz/Fuzz.cpp", |
| 2896 | "fuzz/FuzzCommon.cpp", |
| 2897 | ] |
| 2898 | deps += [ |
| 2899 | ":flags", |
| 2900 | ":gpu_tool_utils", |
| 2901 | ":skia", |
| 2902 | ] |
| 2903 | defines = [ "SK_BUILD_FOR_LIBFUZZER" ] |
| 2904 | if (skia_use_libfuzzer_defaults) { |
| 2905 | cflags = [ "-fsanitize=fuzzer" ] |
| 2906 | ldflags = [ "-fsanitize=fuzzer" ] |
| 2907 | } |
| 2908 | testonly = true |
| 2909 | } |
| 2910 | } |
| 2911 | |
| 2912 | libfuzzer_app("region_deserialize") { |
| 2913 | sources = [ "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp" ] |
| 2914 | deps = [] |
| 2915 | } |
| 2916 | |
| 2917 | libfuzzer_app("image_filter_deserialize") { |
| 2918 | include_dirs = [ |
| 2919 | "tools", |
| 2920 | "tools/fonts", |
| 2921 | ] |
| 2922 | sources = [ |
| 2923 | "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp", |
| 2924 | "tools/Resources.cpp", |
| 2925 | "tools/fonts/TestFontMgr.cpp", |
| 2926 | "tools/fonts/TestSVGTypeface.cpp", |
| 2927 | "tools/fonts/TestTypeface.cpp", |
| 2928 | ] |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2929 | deps = [ "modules/svg" ] |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 2930 | } |
| 2931 | |
| 2932 | libfuzzer_app("region_set_path") { |
| 2933 | sources = [ "fuzz/oss_fuzz/FuzzRegionSetPath.cpp" ] |
| 2934 | deps = [] |
| 2935 | } |
| 2936 | |
| 2937 | libfuzzer_app("textblob_deserialize") { |
| 2938 | include_dirs = [ |
| 2939 | "tools", |
| 2940 | "tools/fonts", |
| 2941 | ] |
| 2942 | sources = [ |
| 2943 | "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp", |
| 2944 | "tools/Resources.cpp", |
| 2945 | "tools/fonts/TestFontMgr.cpp", |
| 2946 | "tools/fonts/TestSVGTypeface.cpp", |
| 2947 | "tools/fonts/TestTypeface.cpp", |
| 2948 | ] |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2949 | deps = [ "modules/svg" ] |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 2950 | } |
| 2951 | |
| 2952 | libfuzzer_app("path_deserialize") { |
| 2953 | sources = [ "fuzz/oss_fuzz/FuzzPathDeserialize.cpp" ] |
| 2954 | deps = [] |
| 2955 | } |
| 2956 | |
| 2957 | libfuzzer_app("image_decode") { |
| 2958 | sources = [ "fuzz/oss_fuzz/FuzzImage.cpp" ] |
| 2959 | deps = [] |
| 2960 | } |
| 2961 | |
| 2962 | libfuzzer_app("animated_image_decode") { |
| 2963 | sources = [ "fuzz/oss_fuzz/FuzzAnimatedImage.cpp" ] |
| 2964 | deps = [] |
| 2965 | } |
| 2966 | |
| 2967 | libfuzzer_app("api_create_ddl") { |
| 2968 | include_dirs = [ |
| 2969 | "include", |
| 2970 | "include/gpu", |
| 2971 | ] |
| 2972 | sources = [ |
| 2973 | "fuzz/FuzzCreateDDL.cpp", |
| 2974 | "fuzz/oss_fuzz/FuzzAPICreateDDL.cpp", |
| 2975 | "tools/Resources.cpp", |
| 2976 | "tools/UrlDataManager.cpp", |
| 2977 | "tools/debugger/DebugCanvas.cpp", |
| 2978 | "tools/debugger/DebugLayerManager.cpp", |
| 2979 | "tools/debugger/DrawCommand.cpp", |
| 2980 | "tools/debugger/JsonWriteBuffer.cpp", |
| 2981 | "tools/fonts/TestFontMgr.cpp", |
| 2982 | "tools/fonts/TestSVGTypeface.cpp", |
| 2983 | "tools/fonts/TestTypeface.cpp", |
| 2984 | ] |
| 2985 | deps = [ |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 2986 | "modules/svg", |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 2987 | "//third_party/libpng", |
| 2988 | ] |
| 2989 | } |
| 2990 | |
| 2991 | libfuzzer_app("api_draw_functions") { |
| 2992 | sources = [ |
| 2993 | "fuzz/FuzzDrawFunctions.cpp", |
| 2994 | "fuzz/oss_fuzz/FuzzDrawFunctions.cpp", |
| 2995 | ] |
| 2996 | deps = [] |
| 2997 | } |
| 2998 | |
Adlai Holler | ccb6866 | 2021-02-25 10:28:44 -0500 | [diff] [blame] | 2999 | libfuzzer_app("api_ddl_threading") { |
| 3000 | sources = [ |
| 3001 | "fuzz/FuzzDDLThreading.cpp", |
| 3002 | "fuzz/oss_fuzz/FuzzDDLThreading.cpp", |
| 3003 | ] |
| 3004 | deps = [] |
| 3005 | } |
| 3006 | |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3007 | libfuzzer_app("api_gradients") { |
| 3008 | sources = [ |
| 3009 | "fuzz/FuzzGradients.cpp", |
| 3010 | "fuzz/oss_fuzz/FuzzGradients.cpp", |
| 3011 | ] |
| 3012 | deps = [] |
| 3013 | } |
| 3014 | |
| 3015 | libfuzzer_app("api_image_filter") { |
| 3016 | include_dirs = [ |
| 3017 | "tools", |
| 3018 | "tools/debugger", |
| 3019 | ] |
| 3020 | sources = [ |
| 3021 | "fuzz/FuzzCanvas.cpp", |
| 3022 | "fuzz/oss_fuzz/FuzzAPIImageFilter.cpp", |
| 3023 | "tools/UrlDataManager.cpp", |
| 3024 | "tools/debugger/DebugCanvas.cpp", |
| 3025 | "tools/debugger/DebugLayerManager.cpp", |
| 3026 | "tools/debugger/DrawCommand.cpp", |
| 3027 | "tools/debugger/JsonWriteBuffer.cpp", |
| 3028 | ] |
| 3029 | deps = [ "//third_party/libpng" ] |
| 3030 | } |
| 3031 | |
| 3032 | libfuzzer_app("api_path_measure") { |
| 3033 | sources = [ |
| 3034 | "fuzz/FuzzPathMeasure.cpp", |
| 3035 | "fuzz/oss_fuzz/FuzzPathMeasure.cpp", |
| 3036 | ] |
| 3037 | deps = [] |
| 3038 | } |
| 3039 | |
| 3040 | libfuzzer_app("api_pathop") { |
| 3041 | sources = [ |
| 3042 | "fuzz/FuzzPathop.cpp", |
| 3043 | "fuzz/oss_fuzz/FuzzPathop.cpp", |
| 3044 | ] |
| 3045 | deps = [] |
| 3046 | } |
| 3047 | |
Robert Phillips | 98b066c | 2021-04-22 10:51:58 -0400 | [diff] [blame] | 3048 | libfuzzer_app("api_triangulation") { |
| 3049 | sources = [ |
| 3050 | "fuzz/FuzzTriangulation.cpp", |
| 3051 | "fuzz/oss_fuzz/FuzzTriangulation.cpp", |
| 3052 | ] |
| 3053 | deps = [] |
| 3054 | } |
| 3055 | |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3056 | libfuzzer_app("api_raster_n32_canvas") { |
| 3057 | include_dirs = [ |
| 3058 | "tools", |
| 3059 | "tools/debugger", |
| 3060 | "tools/fonts", |
| 3061 | ] |
| 3062 | sources = [ |
| 3063 | "fuzz/FuzzCanvas.cpp", |
| 3064 | "fuzz/oss_fuzz/FuzzRasterN32Canvas.cpp", |
| 3065 | "tools/Resources.cpp", |
| 3066 | "tools/UrlDataManager.cpp", |
| 3067 | "tools/debugger/DebugCanvas.cpp", |
| 3068 | "tools/debugger/DebugLayerManager.cpp", |
| 3069 | "tools/debugger/DrawCommand.cpp", |
| 3070 | "tools/debugger/JsonWriteBuffer.cpp", |
| 3071 | "tools/fonts/TestFontMgr.cpp", |
| 3072 | "tools/fonts/TestSVGTypeface.cpp", |
| 3073 | "tools/fonts/TestTypeface.cpp", |
| 3074 | ] |
| 3075 | deps = [ |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 3076 | "modules/svg", |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3077 | "//third_party/libpng", |
| 3078 | ] |
| 3079 | } |
| 3080 | |
Kevin Lubick | 7845b97 | 2021-03-29 08:07:32 -0400 | [diff] [blame] | 3081 | libfuzzer_app("api_regionop") { |
| 3082 | sources = [ |
| 3083 | "fuzz/FuzzRegionOp.cpp", |
| 3084 | "fuzz/oss_fuzz/FuzzRegionOp.cpp", |
| 3085 | ] |
| 3086 | deps = [] |
| 3087 | } |
| 3088 | |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3089 | if (skia_use_gl) { |
| 3090 | libfuzzer_app("api_mock_gpu_canvas") { |
| 3091 | include_dirs = [ |
| 3092 | "tools", |
| 3093 | "tools/debugger", |
| 3094 | "tools/fonts", |
| 3095 | ] |
| 3096 | sources = [ |
| 3097 | "fuzz/FuzzCanvas.cpp", |
| 3098 | "fuzz/oss_fuzz/FuzzMockGPUCanvas.cpp", |
| 3099 | "tools/LsanSuppressions.cpp", |
| 3100 | "tools/Resources.cpp", |
| 3101 | "tools/UrlDataManager.cpp", |
| 3102 | "tools/debugger/DebugCanvas.cpp", |
| 3103 | "tools/debugger/DebugLayerManager.cpp", |
| 3104 | "tools/debugger/DrawCommand.cpp", |
| 3105 | "tools/debugger/JsonWriteBuffer.cpp", |
| 3106 | "tools/fonts/TestFontMgr.cpp", |
| 3107 | "tools/fonts/TestSVGTypeface.cpp", |
| 3108 | "tools/fonts/TestTypeface.cpp", |
| 3109 | ] |
| 3110 | deps = [ |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 3111 | "modules/svg", |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3112 | "//third_party/libpng", |
| 3113 | ] |
| 3114 | } |
| 3115 | } |
| 3116 | |
| 3117 | libfuzzer_app("api_null_canvas") { |
| 3118 | include_dirs = [ |
| 3119 | "tools", |
| 3120 | "tools/debugger", |
| 3121 | "tools/fonts", |
| 3122 | ] |
| 3123 | sources = [ |
| 3124 | "fuzz/FuzzCanvas.cpp", |
| 3125 | "fuzz/oss_fuzz/FuzzNullCanvas.cpp", |
| 3126 | "tools/Resources.cpp", |
| 3127 | "tools/UrlDataManager.cpp", |
| 3128 | "tools/debugger/DebugCanvas.cpp", |
| 3129 | "tools/debugger/DebugLayerManager.cpp", |
| 3130 | "tools/debugger/DrawCommand.cpp", |
| 3131 | "tools/debugger/JsonWriteBuffer.cpp", |
| 3132 | "tools/fonts/TestFontMgr.cpp", |
| 3133 | "tools/fonts/TestSVGTypeface.cpp", |
| 3134 | "tools/fonts/TestTypeface.cpp", |
| 3135 | ] |
| 3136 | deps = [ |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 3137 | "modules/svg", |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3138 | "//third_party/libpng", |
| 3139 | ] |
| 3140 | } |
| 3141 | |
Weston Tracey | 1a771fe | 2021-02-04 11:09:59 -0500 | [diff] [blame] | 3142 | libfuzzer_app("api_skparagraph") { |
| 3143 | sources = [ |
| 3144 | "fuzz/FuzzSkParagraph.cpp", |
| 3145 | "fuzz/oss_fuzz/FuzzSkParagraph.cpp", |
| 3146 | "tools/Resources.cpp", |
| 3147 | ] |
| 3148 | deps = [ "modules/skparagraph" ] |
| 3149 | } |
| 3150 | |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3151 | libfuzzer_app("api_svg_canvas") { |
| 3152 | include_dirs = [ |
| 3153 | "include", |
| 3154 | "include/svg", |
| 3155 | ] |
| 3156 | sources = [ |
| 3157 | "fuzz/FuzzCanvas.cpp", |
| 3158 | "fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp", |
| 3159 | "tools/Resources.cpp", |
| 3160 | "tools/UrlDataManager.cpp", |
| 3161 | "tools/debugger/DebugCanvas.cpp", |
| 3162 | "tools/debugger/DebugLayerManager.cpp", |
| 3163 | "tools/debugger/DrawCommand.cpp", |
| 3164 | "tools/debugger/JsonWriteBuffer.cpp", |
| 3165 | "tools/fonts/TestFontMgr.cpp", |
| 3166 | "tools/fonts/TestSVGTypeface.cpp", |
| 3167 | "tools/fonts/TestTypeface.cpp", |
| 3168 | ] |
| 3169 | deps = [ |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 3170 | "modules/svg", |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3171 | "//third_party/libpng", |
| 3172 | ] |
| 3173 | } |
| 3174 | |
| 3175 | libfuzzer_app("png_encoder") { |
| 3176 | sources = [ |
| 3177 | "fuzz/FuzzEncoders.cpp", |
| 3178 | "fuzz/oss_fuzz/FuzzPNGEncoder.cpp", |
| 3179 | ] |
| 3180 | deps = [] |
| 3181 | } |
| 3182 | |
| 3183 | libfuzzer_app("jpeg_encoder") { |
| 3184 | sources = [ |
| 3185 | "fuzz/FuzzEncoders.cpp", |
| 3186 | "fuzz/oss_fuzz/FuzzJPEGEncoder.cpp", |
| 3187 | ] |
| 3188 | deps = [] |
| 3189 | } |
| 3190 | |
| 3191 | libfuzzer_app("webp_encoder") { |
| 3192 | sources = [ |
| 3193 | "fuzz/FuzzEncoders.cpp", |
| 3194 | "fuzz/oss_fuzz/FuzzWEBPEncoder.cpp", |
| 3195 | ] |
| 3196 | deps = [] |
| 3197 | } |
| 3198 | |
| 3199 | libfuzzer_app("skottie_json") { |
| 3200 | sources = [ |
| 3201 | "modules/skottie/fuzz/FuzzSkottieJSON.cpp", |
| 3202 | "tools/Resources.cpp", |
| 3203 | "tools/fonts/TestFontMgr.cpp", |
| 3204 | "tools/fonts/TestSVGTypeface.cpp", |
| 3205 | "tools/fonts/TestTypeface.cpp", |
| 3206 | ] |
| 3207 | deps = [ |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3208 | "modules/skottie:skottie", |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 3209 | "modules/svg", |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3210 | ] |
| 3211 | } |
| 3212 | |
| 3213 | libfuzzer_app("skjson") { |
| 3214 | sources = [ "fuzz/oss_fuzz/FuzzJSON.cpp" ] |
| 3215 | deps = [] |
| 3216 | } |
| 3217 | |
| 3218 | libfuzzer_app("api_polyutils") { |
| 3219 | sources = [ |
| 3220 | "fuzz/FuzzPolyUtils.cpp", |
| 3221 | "fuzz/oss_fuzz/FuzzPolyUtils.cpp", |
| 3222 | ] |
| 3223 | deps = [ ":skia" ] |
| 3224 | } |
| 3225 | |
| 3226 | libfuzzer_app("android_codec") { |
| 3227 | sources = [ "fuzz/oss_fuzz/FuzzAndroidCodec.cpp" ] |
| 3228 | deps = [] |
| 3229 | } |
| 3230 | |
| 3231 | libfuzzer_app("image_decode_incremental") { |
| 3232 | sources = [ "fuzz/oss_fuzz/FuzzIncrementalImage.cpp" ] |
| 3233 | deps = [] |
| 3234 | } |
| 3235 | |
| 3236 | libfuzzer_app("sksl2glsl") { |
| 3237 | sources = [ "fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp" ] |
| 3238 | deps = [] |
| 3239 | } |
| 3240 | |
| 3241 | libfuzzer_app("sksl2spirv") { |
| 3242 | sources = [ "fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp" ] |
| 3243 | deps = [] |
| 3244 | } |
| 3245 | |
| 3246 | libfuzzer_app("sksl2metal") { |
| 3247 | sources = [ "fuzz/oss_fuzz/FuzzSKSL2Metal.cpp" ] |
| 3248 | deps = [] |
| 3249 | } |
| 3250 | |
| 3251 | libfuzzer_app("sksl2pipeline") { |
| 3252 | sources = [ "fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp" ] |
| 3253 | deps = [] |
| 3254 | } |
| 3255 | |
| 3256 | libfuzzer_app("skdescriptor_deserialize") { |
| 3257 | sources = [ "fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp" ] |
| 3258 | deps = [] |
| 3259 | } |
| 3260 | |
| 3261 | libfuzzer_app("svg_dom") { |
| 3262 | sources = [ "fuzz/oss_fuzz/FuzzSVG.cpp" ] |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 3263 | deps = [ "modules/svg" ] |
Kevin Lubick | 272e8bc | 2020-09-15 10:05:41 -0400 | [diff] [blame] | 3264 | } |
| 3265 | |
| 3266 | libfuzzer_app("skruntimeeffect") { |
| 3267 | sources = [ "fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp" ] |
| 3268 | deps = [] |
| 3269 | } |
| 3270 | |
| 3271 | libfuzzer_app("skp") { |
| 3272 | sources = [ "fuzz/oss_fuzz/FuzzSKP.cpp" ] |
| 3273 | deps = [] |
| 3274 | } |
| 3275 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 3276 | } |
Hal Canary | 932a2c0 | 2019-09-17 10:43:18 -0400 | [diff] [blame] | 3277 | |
Chinmay Garde | a1ea0a9 | 2019-10-01 16:37:10 -0700 | [diff] [blame] | 3278 | if (is_ios && skia_use_metal && !skia_enable_flutter_defines) { |
Hal Canary | 932a2c0 | 2019-09-17 10:43:18 -0400 | [diff] [blame] | 3279 | group("minimal_ios_mtl_skia_app") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 3280 | deps = [ "experimental/minimal_ios_mtl_skia_app" ] |
Hal Canary | 932a2c0 | 2019-09-17 10:43:18 -0400 | [diff] [blame] | 3281 | } |
Hal Canary | 2748306 | 2019-12-06 15:01:08 -0500 | [diff] [blame] | 3282 | } |
| 3283 | |
Hal Canary | 60ff651 | 2020-01-21 12:39:20 -0500 | [diff] [blame] | 3284 | if (is_ios && skia_enable_skottie && !skia_enable_flutter_defines) { |
Hal Canary | 932a2c0 | 2019-09-17 10:43:18 -0400 | [diff] [blame] | 3285 | group("skottie_ios") { |
Mike Klein | a01c6b0 | 2020-04-01 13:47:34 -0500 | [diff] [blame] | 3286 | deps = [ "tools/skottie_ios_app" ] |
Hal Canary | 932a2c0 | 2019-09-17 10:43:18 -0400 | [diff] [blame] | 3287 | } |
| 3288 | } |
Martin Kustermann | b65d299 | 2020-12-15 16:15:13 +0100 | [diff] [blame] | 3289 | |
Ben Wagner | 3d9ab7e | 2021-03-16 14:29:20 -0400 | [diff] [blame] | 3290 | skia_executable("skia_c_api_example") { |
Martin Kustermann | b65d299 | 2020-12-15 16:15:13 +0100 | [diff] [blame] | 3291 | sources = [ "experimental/c-api-example/skia-c-example.c" ] |
| 3292 | include_dirs = [ "." ] |
| 3293 | deps = [ ":skia" ] |
| 3294 | } |