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