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