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