blob: 3644a8a1c53fee8a10dfbef67c1df1b74ce4b11f [file] [log] [blame]
mtkleinc04ff472016-06-23 10:29:30 -07001# 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 Osmanf2c90142017-07-13 15:50:03 -04006import("gn/flutter_defines.gni")
mikejurka8c24f4f2016-09-12 16:51:58 -07007import("gn/shared_sources.gni")
brettwb9447282016-09-01 14:24:39 -07008
Forrest Reiling30229ac2017-04-17 13:36:39 -07009if (is_fuchsia) {
10 import("//build/vulkan/config.gni")
11}
12
Mike Klein3669a822017-03-03 10:55:02 -050013if (!defined(is_skia_standalone)) {
14 is_skia_standalone = false
15}
16is_skia_dev_build = is_skia_standalone && !is_official_build
17
mtkleinc04ff472016-06-23 10:29:30 -070018declare_args() {
Mike Kleinc168a3a2016-11-14 14:53:13 +000019 skia_use_angle = false
Kevin Lubick4a24e102017-03-29 11:19:01 -040020 skia_use_egl = false
mtklein63213812016-08-24 09:55:56 -070021 skia_use_expat = true
mtklein3cc22182016-08-29 13:26:14 -070022 skia_use_fontconfig = is_linux
mtkleincdedd0e2016-09-12 15:15:44 -070023 skia_use_freetype = is_android || is_fuchsia || is_linux
Mike Klein7d302882016-11-03 14:06:31 -040024 skia_use_icu = !is_fuchsia && !is_ios && !is_win # TODO: Windows
mtklein63213812016-08-24 09:55:56 -070025 skia_use_libjpeg_turbo = true
26 skia_use_libpng = true
mtkleineb3c4252016-08-23 07:38:09 -070027 skia_use_libwebp = !is_fuchsia
Mike Kleinfae86b72018-01-08 15:49:09 -050028 skia_use_lua = is_skia_dev_build && !is_ios
Mike Klein10d665d2016-11-01 11:46:10 -040029 skia_use_piex = !is_win
mtklein63213812016-08-24 09:55:56 -070030 skia_use_zlib = true
Greg Daniele5ddff52017-07-05 16:49:36 -040031 skia_use_metal = false
Mike Klein36f182f2017-10-20 12:33:53 -040032 skia_use_libheif = is_skia_dev_build
Mike Kleinfb333552018-01-25 12:49:37 -050033 skia_use_skcms = is_skia_dev_build
mtklein1bd72ba2016-09-16 07:45:52 -070034
Mike Klein7d921032017-01-05 12:20:41 -050035 skia_android_serial = ""
Brian Osman3f375d02016-12-28 11:19:22 -050036 skia_enable_discrete_gpu = true
Mike Kleina04bb452017-02-09 12:24:07 -050037 skia_enable_effects = true
Brian Osmanf2c90142017-07-13 15:50:03 -040038 skia_enable_flutter_defines = false
Hal Canaryff2742e2018-01-30 11:35:47 -050039 skia_enable_fontmgr_empty = false
Brian Osman74511012018-04-02 20:13:46 +000040 skia_enable_gpu = true
Hal Canary43fb7a02016-12-30 13:09:03 -050041 skia_enable_pdf = true
Ethan Nicholasa6ae1f72017-03-16 09:56:54 -040042 skia_enable_spirv_validation = is_skia_dev_build && is_debug
Mike Klein3669a822017-03-03 10:55:02 -050043 skia_enable_tools = is_skia_dev_build
44 skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug
Greg Danielafb7ec72017-12-07 12:48:30 -050045 skia_vulkan_header = ""
Greg Daniel686bb212016-10-27 10:48:48 -040046 skia_vulkan_sdk = getenv("VULKAN_SDK")
Robert Phillipsa6d2d702017-09-01 12:17:03 -040047 skia_qt_path = getenv("QT_PATH")
Ethan Nicholas762466e2017-06-29 10:03:38 -040048 skia_compile_processors = false
Adrienne Walker1df7cd82018-04-18 13:46:25 -070049 skia_generate_workarounds = false
Ethan Nicholas5b5f0962017-09-11 13:50:14 -070050 skia_lex = false
Mike Kleinc55a6cb2017-06-28 13:21:47 -040051
Hal Canary4689b542018-01-31 11:54:14 -050052 skia_skqp_enable_driver_correctness_workarounds = false
Hal Canary2331c822018-02-01 14:06:13 -050053 skia_skqp_global_error_tolerance = 0
Ethan Nicholas26a9aad2018-03-27 14:10:52 -040054
55 skia_llvm_path = ""
56 skia_llvm_lib = "LLVM"
mtkleinc04ff472016-06-23 10:29:30 -070057}
Brian Salomon23d73ea2016-10-27 13:31:37 -040058declare_args() {
Matt Sarett189491c2017-03-20 18:09:30 -040059 skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib
Mike Klein10d665d2016-11-01 11:46:10 -040060 skia_use_sfntly = skia_use_icu
Brian Salomoncbcb0a12017-11-19 13:20:13 -050061 skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu
Mike Klein10d665d2016-11-01 11:46:10 -040062
Brian Salomon5f33a8c2018-02-26 14:32:39 -050063 skia_use_legacy_gpu_pixel_ops = is_skia_dev_build && is_win # Arbitrary to keep old code path tested until deletion.
64
Mike Klein4d598a32016-10-31 13:44:49 -040065 if (is_android) {
66 skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
Forrest Reiling30229ac2017-04-17 13:36:39 -070067 } else if (is_fuchsia) {
68 skia_use_vulkan = fuchsia_use_vulkan
Mike Klein4d598a32016-10-31 13:44:49 -040069 } else {
70 skia_use_vulkan = skia_vulkan_sdk != ""
71 }
Jim Van Verth4e502972017-12-07 15:16:10 -050072
73 if (is_ios) {
74 skia_ios_identity = ".*Google.*"
75 skia_ios_profile = "Google Development"
76 }
Brian Salomon23d73ea2016-10-27 13:31:37 -040077}
Greg Danielec6ae522017-04-25 13:38:26 -040078declare_args() {
Greg Danielafb7ec72017-12-07 12:48:30 -050079 skia_tools_vulkan_header_dir = ""
Greg Danielec6ae522017-04-25 13:38:26 -040080 if (skia_use_vulkan) {
Robert Phillipsfcd5fdd2017-06-14 01:43:29 +000081 # When buliding on Android we get the header via the NDK so no need for any extra path.
Greg Danielec6ae522017-04-25 13:38:26 -040082 if (is_fuchsia) {
Greg Danielafb7ec72017-12-07 12:48:30 -050083 skia_tools_vulkan_header_dir = "$fuchsia_vulkan_sdk/include"
Greg Danielec6ae522017-04-25 13:38:26 -040084 } else if (is_linux || is_win) {
Greg Danielafb7ec72017-12-07 12:48:30 -050085 skia_tools_vulkan_header_dir = "$skia_vulkan_sdk/include"
Greg Danielec6ae522017-04-25 13:38:26 -040086 }
Greg Danielec6ae522017-04-25 13:38:26 -040087 }
88}
Brian Salomon789e25e2016-09-30 13:41:03 -040089
Adam Barth54ef74a2017-10-13 10:59:38 -070090if (defined(skia_settings)) {
91 import(skia_settings)
92}
93
mtklein38925aa2016-09-21 10:11:25 -070094# Our tools require static linking (they use non-exported symbols).
95skia_enable_tools = skia_enable_tools && !is_component_build
mtklein06c35c02016-09-20 12:28:12 -070096
mtkleina45be612016-08-29 15:22:10 -070097fontmgr_android_enabled = skia_use_expat && skia_use_freetype
98
mtklein1211e0c2016-07-26 13:55:45 -070099skia_public_includes = [
mtklein25c81d42016-07-27 13:55:26 -0700100 "include/android",
mtkleinfa84d942016-07-28 09:45:14 -0700101 "include/c",
mtklein1211e0c2016-07-26 13:55:45 -0700102 "include/codec",
103 "include/config",
104 "include/core",
105 "include/effects",
Matt Sarett94fd06f2017-05-08 17:31:00 -0400106 "include/encode",
mtklein1211e0c2016-07-26 13:55:45 -0700107 "include/gpu",
108 "include/gpu/gl",
Brian Salomoncbcb0a12017-11-19 13:20:13 -0500109 "include/atlastext",
mtklein1211e0c2016-07-26 13:55:45 -0700110 "include/pathops",
111 "include/ports",
mtklein25c81d42016-07-27 13:55:26 -0700112 "include/svg",
mtklein1211e0c2016-07-26 13:55:45 -0700113 "include/utils",
114 "include/utils/mac",
mtklein1211e0c2016-07-26 13:55:45 -0700115]
116
Robert Phillipsfcd5fdd2017-06-14 01:43:29 +0000117if (skia_use_vulkan) {
118 skia_public_includes += [ "include/gpu/vk" ]
119}
Brian Salomoncbcb0a12017-11-19 13:20:13 -0500120if (skia_enable_atlas_text) {
121 skia_public_includes += [ "include/atlastext" ]
122}
Greg Daniele5ddff52017-07-05 16:49:36 -0400123if (skia_use_metal) {
124 skia_public_includes += [ "include/gpu/mtl" ]
125}
Robert Phillipsfcd5fdd2017-06-14 01:43:29 +0000126
mtkleinc04ff472016-06-23 10:29:30 -0700127# Skia public API, generally provided by :skia.
128config("skia_public") {
mtklein1211e0c2016-07-26 13:55:45 -0700129 include_dirs = skia_public_includes
Greg Danielafb7ec72017-12-07 12:48:30 -0500130 if (skia_tools_vulkan_header_dir != "") {
131 include_dirs += [ skia_tools_vulkan_header_dir ]
Greg Danielec6ae522017-04-25 13:38:26 -0400132 }
Mike Kleinae7e6712016-10-11 17:49:33 -0400133 defines = []
134 if (is_component_build) {
135 defines += [ "SKIA_DLL" ]
136 }
Mike Kleinc4cbd742016-09-26 21:37:09 -0400137 if (is_fuchsia || is_linux) {
jcgregorio5561e3d2016-08-25 09:25:11 -0700138 defines += [ "SK_SAMPLES_FOR_X" ]
139 }
Brian Osmanf2c90142017-07-13 15:50:03 -0400140 if (skia_enable_flutter_defines) {
141 defines += flutter_defines
142 }
mtklein06c35c02016-09-20 12:28:12 -0700143 if (!skia_enable_gpu) {
144 defines += [ "SK_SUPPORT_GPU=0" ]
145 }
Brian Salomoncbcb0a12017-11-19 13:20:13 -0500146 if (skia_enable_atlas_text) {
147 defines += [ "SK_SUPPORT_ATLAS_TEXT=1" ]
148 }
mtkleinc04ff472016-06-23 10:29:30 -0700149}
150
151# Skia internal APIs, used by Skia itself and a few test tools.
152config("skia_private") {
153 visibility = [ ":*" ]
154
155 include_dirs = [
156 "include/private",
157 "src/c",
mtklein1211e0c2016-07-26 13:55:45 -0700158 "src/codec",
mtkleinc04ff472016-06-23 10:29:30 -0700159 "src/core",
160 "src/effects",
mtklein25c81d42016-07-27 13:55:26 -0700161 "src/fonts",
mtkleinc04ff472016-06-23 10:29:30 -0700162 "src/image",
163 "src/images",
164 "src/lazy",
165 "src/opts",
166 "src/pathops",
mtklein2b6870c2016-07-28 14:17:33 -0700167 "src/pdf",
mtkleinc04ff472016-06-23 10:29:30 -0700168 "src/ports",
169 "src/sfnt",
Florin Malita5edba452017-05-30 16:39:47 -0400170 "src/shaders",
171 "src/shaders/gradients",
mtklein9e0d9dd2016-08-30 10:37:19 -0700172 "src/sksl",
mtkleinc04ff472016-06-23 10:29:30 -0700173 "src/utils",
mtklein7a1f45f2016-08-04 06:19:33 -0700174 "src/utils/win",
Herb Derby5a8fe972017-02-14 14:42:30 -0500175 "src/xml",
scroggo19b91532016-10-24 09:03:26 -0700176 "third_party/gif",
mtkleinc04ff472016-06-23 10:29:30 -0700177 ]
Ethan Nicholas26a9aad2018-03-27 14:10:52 -0400178 if (skia_llvm_path != "") {
179 include_dirs += [ "$skia_llvm_path/include" ]
180 }
mtklein150d1132016-08-01 06:56:40 -0700181
Mike Reeda9e241d2017-05-03 10:52:00 -0400182 defines = [ "SK_GAMMA_APPLY_TO_A8" ]
mtkleinb37c0342016-09-09 11:07:45 -0700183 if (is_android) {
184 defines += [
185 "SK_GAMMA_EXPONENT=1.4",
186 "SK_GAMMA_CONTRAST=0.0",
187 ]
188 }
mtklein88a7ac02016-09-14 11:16:49 -0700189 if (is_official_build || is_android) {
190 # TODO(bsalomon): it'd be nice to make Android normal.
191 defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
192 }
Brian Salomon789e25e2016-09-30 13:41:03 -0400193 libs = []
194 lib_dirs = []
Brian Salomon03e05842017-02-23 12:23:47 -0500195 if (skia_enable_gpu) {
196 include_dirs += [ "src/gpu" ]
Greg Danielafb7ec72017-12-07 12:48:30 -0500197 if (is_skia_dev_build && skia_use_vulkan) {
198 include_dirs += [ "tools/gpu/vk" ]
199 }
Brian Salomon03e05842017-02-23 12:23:47 -0500200 }
Brian Osman34755e22016-12-05 09:46:02 -0500201 if (skia_use_angle) {
202 defines += [ "SK_ANGLE" ]
203 }
Brian Osman3f375d02016-12-28 11:19:22 -0500204 if (skia_enable_discrete_gpu) {
205 defines += [ "SK_ENABLE_DISCRETE_GPU" ]
206 }
Brian Salomon0c26a9d2017-07-06 10:09:38 -0400207 if (!is_official_build) {
208 defines += [ "GR_TEST_UTILS=1" ]
209 }
Ethan Nicholas26a9aad2018-03-27 14:10:52 -0400210 if (skia_llvm_path != "") {
211 defines += [ "SK_LLVM_AVAILABLE" ]
212 include_dirs += [ "$skia_llvm_path/include" ]
213 libs += [ skia_llvm_lib ]
214 lib_dirs += [ "$skia_llvm_path/lib/" ]
215 }
mtkleinc04ff472016-06-23 10:29:30 -0700216}
217
218# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
219config("skia_library") {
220 visibility = [ ":*" ]
mtkleinc04ff472016-06-23 10:29:30 -0700221 defines = [ "SKIA_IMPLEMENTATION=1" ]
222}
223
224skia_library_configs = [
225 ":skia_public",
226 ":skia_private",
227 ":skia_library",
228]
229
mtklein9b8583d2016-08-24 17:32:30 -0700230# Use for CPU-specific Skia code that needs particular compiler flags.
231template("opts") {
232 if (invoker.enabled) {
233 source_set(target_name) {
234 forward_variables_from(invoker, "*")
235 configs += skia_library_configs
236 }
237 } else {
238 # If not enabled, a phony empty target that swallows all otherwise unused variables.
239 source_set(target_name) {
240 forward_variables_from(invoker,
241 "*",
242 [
243 "sources",
244 "cflags",
245 ])
246 }
247 }
anmittala7eaf2e2016-08-17 13:57:26 -0700248}
249
mtklein422310d2016-08-16 18:28:43 -0700250is_x86 = current_cpu == "x64" || current_cpu == "x86"
mtkleinc04ff472016-06-23 10:29:30 -0700251
mtklein7d6fb2c2016-08-25 14:50:44 -0700252opts("none") {
253 enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
brettwb9447282016-09-01 14:24:39 -0700254 sources = skia_opts.none_sources
anmittalb8b3f712016-08-25 04:55:19 -0700255 cflags = []
256}
257
mtklein7d6fb2c2016-08-25 14:50:44 -0700258opts("armv7") {
anmittalb8b3f712016-08-25 04:55:19 -0700259 enabled = current_cpu == "arm"
brettwb9447282016-09-01 14:24:39 -0700260 sources = skia_opts.armv7_sources + skia_opts.neon_sources
mtklein7d6fb2c2016-08-25 14:50:44 -0700261 cflags = []
anmittalb8b3f712016-08-25 04:55:19 -0700262}
263
264opts("arm64") {
265 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700266 sources = skia_opts.arm64_sources
anmittalb8b3f712016-08-25 04:55:19 -0700267 cflags = []
268}
269
270opts("crc32") {
271 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700272 sources = skia_opts.crc32_sources
anmittalb8b3f712016-08-25 04:55:19 -0700273 cflags = [ "-march=armv8-a+crc" ]
274}
275
mtklein9b8583d2016-08-24 17:32:30 -0700276opts("sse2") {
277 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700278 sources = skia_opts.sse2_sources
Mike Kleinc722f792017-07-31 11:57:21 -0400279 if (!is_clang && is_win) {
Mike Kleind8765e32016-10-19 13:39:13 -0400280 defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ]
281 } else {
Mike Klein3eb71212016-10-11 17:08:53 -0400282 cflags = [ "-msse2" ]
283 }
mtklein9b8583d2016-08-24 17:32:30 -0700284}
mtkleinc04ff472016-06-23 10:29:30 -0700285
mtklein9b8583d2016-08-24 17:32:30 -0700286opts("ssse3") {
287 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700288 sources = skia_opts.ssse3_sources
Mike Kleinc722f792017-07-31 11:57:21 -0400289 if (!is_clang && is_win) {
Mike Kleind8765e32016-10-19 13:39:13 -0400290 defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ]
291 } else {
Mike Klein3eb71212016-10-11 17:08:53 -0400292 cflags = [ "-mssse3" ]
293 }
mtklein9b8583d2016-08-24 17:32:30 -0700294}
mtkleinc04ff472016-06-23 10:29:30 -0700295
mtklein9b8583d2016-08-24 17:32:30 -0700296opts("sse41") {
297 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700298 sources = skia_opts.sse41_sources
Mike Kleinc722f792017-07-31 11:57:21 -0400299 if (!is_clang && is_win) {
Mike Kleind8765e32016-10-19 13:39:13 -0400300 defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ]
301 } else {
Mike Klein3eb71212016-10-11 17:08:53 -0400302 cflags = [ "-msse4.1" ]
303 }
mtklein9b8583d2016-08-24 17:32:30 -0700304}
mtklein4e976072016-08-08 09:06:27 -0700305
mtklein9b8583d2016-08-24 17:32:30 -0700306opts("sse42") {
307 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700308 sources = skia_opts.sse42_sources
Mike Kleinc722f792017-07-31 11:57:21 -0400309 if (!is_clang && is_win) {
Mike Kleind8765e32016-10-19 13:39:13 -0400310 defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ]
311 } else {
Mike Klein3eb71212016-10-11 17:08:53 -0400312 cflags = [ "-msse4.2" ]
313 }
mtklein9b8583d2016-08-24 17:32:30 -0700314}
315
316opts("avx") {
317 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700318 sources = skia_opts.avx_sources
Mike Klein4d4b3aa2018-03-21 13:07:35 -0400319 if (is_win) {
Mike Klein17b6e482016-11-18 22:11:41 +0000320 cflags = [ "/arch:AVX" ]
Mike Klein3eb71212016-10-11 17:08:53 -0400321 } else {
322 cflags = [ "-mavx" ]
323 }
mtkleinc04ff472016-06-23 10:29:30 -0700324}
325
Mike Klein1b9b7d52018-02-27 10:37:40 -0500326opts("hsw") {
327 enabled = is_x86
328 sources = skia_opts.hsw_sources
Mike Klein4d4b3aa2018-03-21 13:07:35 -0400329 if (is_win) {
Mike Klein1b9b7d52018-02-27 10:37:40 -0500330 cflags = [ "/arch:AVX2" ]
331 } else {
Mike Kleine87c4862018-03-23 00:13:58 +0000332 cflags = [ "-march=haswell" ]
Mike Klein1b9b7d52018-02-27 10:37:40 -0500333 }
334
335 # Oddly, clang-cl doesn't recognize this as a valid flag.
336 # If it ever does, it'd nice to move this up with -mavx2 and co.
337 if (is_clang && !is_win) {
338 # This flag lets Clang generate FMAs when it sees a mul-then-add. It's optional,
339 # but nice to have, generating slightly better code for paths without explicit FMAs.
340 cflags += [ "-ffp-contract=fast" ]
341 }
342}
343
mtkleinc095df52016-08-24 12:23:52 -0700344# Any feature of Skia that requires third-party code should be optional and use this template.
mtklein457b42a2016-08-23 13:56:37 -0700345template("optional") {
346 if (invoker.enabled) {
347 config(target_name + "_public") {
mtkleincd01b032016-08-31 04:58:19 -0700348 if (defined(invoker.public_defines)) {
349 defines = invoker.public_defines
350 }
mtklein457b42a2016-08-23 13:56:37 -0700351 }
352 source_set(target_name) {
mtkleincd01b032016-08-31 04:58:19 -0700353 forward_variables_from(invoker,
354 "*",
355 [
356 "public_defines",
357 "sources_when_disabled",
scroggof84ad642016-10-31 09:02:57 -0700358 "configs_to_remove",
mtkleincd01b032016-08-31 04:58:19 -0700359 ])
mtklein457b42a2016-08-23 13:56:37 -0700360 all_dependent_configs = [ ":" + target_name + "_public" ]
mtklein9b8583d2016-08-24 17:32:30 -0700361 configs += skia_library_configs
scroggof84ad642016-10-31 09:02:57 -0700362 if (defined(invoker.configs_to_remove)) {
363 configs -= invoker.configs_to_remove
364 }
mtklein457b42a2016-08-23 13:56:37 -0700365 }
366 } else {
mtklein457b42a2016-08-23 13:56:37 -0700367 source_set(target_name) {
368 forward_variables_from(invoker,
369 "*",
370 [
371 "public_defines",
mtklein457b42a2016-08-23 13:56:37 -0700372 "deps",
mtklein6ef69992016-09-14 06:12:09 -0700373 "libs",
mtklein457b42a2016-08-23 13:56:37 -0700374 "sources",
mtkleincd01b032016-08-31 04:58:19 -0700375 "sources_when_disabled",
scroggof84ad642016-10-31 09:02:57 -0700376 "configs_to_remove",
mtklein457b42a2016-08-23 13:56:37 -0700377 ])
mtkleincd01b032016-08-31 04:58:19 -0700378 if (defined(invoker.sources_when_disabled)) {
379 sources = invoker.sources_when_disabled
380 }
381 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700382 }
mtkleineb3c4252016-08-23 07:38:09 -0700383 }
mtklein457b42a2016-08-23 13:56:37 -0700384}
mtklein457b42a2016-08-23 13:56:37 -0700385
Mike Kleina04bb452017-02-09 12:24:07 -0500386optional("effects") {
387 enabled = skia_enable_effects
Ethan Nicholas762466e2017-06-29 10:03:38 -0400388 deps = [
389 ":compile_processors",
390 ]
Mike Kleina04bb452017-02-09 12:24:07 -0500391 sources =
392 skia_effects_sources + [ "src/ports/SkGlobalInitialization_default.cpp" ]
393 sources_when_disabled = [ "src/ports/SkGlobalInitialization_none.cpp" ]
394}
395
mtkleina45be612016-08-29 15:22:10 -0700396optional("fontmgr_android") {
397 enabled = fontmgr_android_enabled
mtkleina45be612016-08-29 15:22:10 -0700398
399 deps = [
Ben Wagnerfc497342017-02-24 11:15:26 -0500400 ":typeface_freetype",
mtkleina45be612016-08-29 15:22:10 -0700401 "//third_party/expat",
mtkleina45be612016-08-29 15:22:10 -0700402 ]
403 sources = [
404 "src/ports/SkFontMgr_android.cpp",
405 "src/ports/SkFontMgr_android_factory.cpp",
406 "src/ports/SkFontMgr_android_parser.cpp",
407 ]
408}
409
mtkleind2e39db2016-09-07 07:52:55 -0700410optional("fontmgr_custom") {
411 enabled = is_linux && skia_use_freetype && !skia_use_fontconfig
412
413 deps = [
Ben Wagnerfc497342017-02-24 11:15:26 -0500414 ":typeface_freetype",
mtkleind2e39db2016-09-07 07:52:55 -0700415 ]
416 sources = [
417 "src/ports/SkFontMgr_custom.cpp",
Ben Wagner8ab590f2017-02-08 17:29:33 -0500418 "src/ports/SkFontMgr_custom.h",
419 "src/ports/SkFontMgr_custom_directory.cpp",
mtkleind2e39db2016-09-07 07:52:55 -0700420 "src/ports/SkFontMgr_custom_directory_factory.cpp",
Ben Wagner8ab590f2017-02-08 17:29:33 -0500421 "src/ports/SkFontMgr_custom_embedded.cpp",
422 "src/ports/SkFontMgr_custom_empty.cpp",
mtkleind2e39db2016-09-07 07:52:55 -0700423 ]
424}
425
Hal Canaryff2742e2018-01-30 11:35:47 -0500426optional("fontmgr_empty") {
427 enabled = skia_enable_fontmgr_empty
428 sources = [
429 "src/ports/SkFontMgr_empty_factory.cpp",
430 ]
431}
432
mtklein3cc22182016-08-29 13:26:14 -0700433optional("fontmgr_fontconfig") {
434 enabled = skia_use_freetype && skia_use_fontconfig
mtklein3cc22182016-08-29 13:26:14 -0700435
436 deps = [
Ben Wagnerfc497342017-02-24 11:15:26 -0500437 ":typeface_freetype",
mtklein3cc22182016-08-29 13:26:14 -0700438 "//third_party:fontconfig",
mtklein3cc22182016-08-29 13:26:14 -0700439 ]
440 sources = [
bungeman1ae0e012016-09-19 12:13:16 -0700441 "src/ports/SkFontConfigInterface.cpp",
mtklein3cc22182016-08-29 13:26:14 -0700442 "src/ports/SkFontConfigInterface_direct.cpp",
443 "src/ports/SkFontConfigInterface_direct_factory.cpp",
444 "src/ports/SkFontMgr_FontConfigInterface.cpp",
445 "src/ports/SkFontMgr_fontconfig.cpp",
446 "src/ports/SkFontMgr_fontconfig_factory.cpp",
447 ]
448}
449
mtkleincdedd0e2016-09-12 15:15:44 -0700450optional("fontmgr_fuchsia") {
451 enabled = is_fuchsia && skia_use_freetype
452
453 deps = [
Ben Wagnerfc497342017-02-24 11:15:26 -0500454 ":typeface_freetype",
mtkleincdedd0e2016-09-12 15:15:44 -0700455 ]
456 sources = [
457 "src/ports/SkFontMgr_custom.cpp",
Ben Wagner8ab590f2017-02-08 17:29:33 -0500458 "src/ports/SkFontMgr_custom_empty.cpp",
mtkleincdedd0e2016-09-12 15:15:44 -0700459 "src/ports/SkFontMgr_custom_empty_factory.cpp",
460 ]
461}
462
Ethan Nicholas5b5f0962017-09-11 13:50:14 -0700463if (skia_lex) {
Ethan Nicholasca82a922017-09-07 09:39:50 -0400464 executable("sksllex") {
465 sources = [
466 "src/sksl/lex/Main.cpp",
467 "src/sksl/lex/NFA.cpp",
468 "src/sksl/lex/RegexNode.cpp",
469 "src/sksl/lex/RegexParser.cpp",
470 ]
471 include_dirs = [ "src/sksl/lex" ]
472 }
473
Ethan Nicholas5b5f0962017-09-11 13:50:14 -0700474 action("run_sksllex") {
475 script = "gn/run_sksllex.py"
Ethan Nicholase148bf72017-10-06 14:22:22 -0400476 deps = [
477 ":sksllex(//gn/toolchain:$host_toolchain)",
478 ]
Ethan Nicholas5b5f0962017-09-11 13:50:14 -0700479 sources = [
480 "src/sksl/lex/layout.lex",
481 "src/sksl/lex/sksl.lex",
482 ]
483
484 # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
485 # path that starts with target_out_dir and then uses ".." to back up into the src dir.
486 outputs = [
487 "$target_out_dir/" +
488 rebase_path("src/sksl/lex/SkSLLexer.h", target_out_dir),
489 # the script also modifies the corresponding .cpp file, but if we tell GN that it gets
490 # confused due to the same file being named by two different paths
491 ]
492 sksllex_path = "$root_out_dir/"
493 sksllex_path += "sksllex"
494 if (host_os == "win") {
495 sksllex_path += ".exe"
496 }
497 args = [
498 rebase_path(sksllex_path),
499 rebase_path("bin/clang-format"),
500 rebase_path("src"),
501 ]
502 }
503} else {
504 group("run_sksllex") {
505 }
506}
507
508if (skia_compile_processors) {
Ethan Nicholas762466e2017-06-29 10:03:38 -0400509 executable("skslc") {
510 defines = [ "SKSL_STANDALONE" ]
511 sources = [
512 "src/sksl/SkSLMain.cpp",
513 ]
514 sources += skia_sksl_sources
515 include_dirs = [
516 "src/gpu",
517 "src/sksl",
518 ]
519 deps = [
Ethan Nicholasaae47c82017-11-10 15:34:03 -0500520 ":run_sksllex",
Ethan Nicholas762466e2017-06-29 10:03:38 -0400521 "//third_party/spirv-tools",
522 ]
523 }
524
525 skia_gpu_processor_outputs = []
526 foreach(src, skia_gpu_processor_sources) {
527 dir = get_path_info(src, "dir")
528 name = get_path_info(src, "name")
529
530 # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
531 # path that starts with target_out_dir and then uses ".." to back up into the src dir.
532 skia_gpu_processor_outputs += [
533 "$target_out_dir/" + rebase_path("$dir/$name.h", target_out_dir),
534 # the script also modifies the corresponding .cpp file, but if we tell GN that it gets
535 # confused due to the same file being named by two different paths
536 ]
537 }
538
Ethan Nicholasaae47c82017-11-10 15:34:03 -0500539 action("create_sksl_enums") {
540 script = "gn/create_sksl_enums.py"
541 sources = [
542 "include/private/GrSharedEnums.h",
543 ]
544 outputs = [
545 "$target_out_dir/" +
Ben Wagnera56c4d22018-01-24 17:32:17 -0500546 rebase_path("src/sksl/sksl_enums.inc", target_out_dir),
Ethan Nicholasaae47c82017-11-10 15:34:03 -0500547 ]
548 args = [
549 rebase_path(sources[0]),
550 rebase_path(outputs[0]),
551 ]
552 }
553
Ethan Nicholas762466e2017-06-29 10:03:38 -0400554 action("compile_processors") {
555 script = "gn/compile_processors.py"
556 deps = [
Ethan Nicholasaae47c82017-11-10 15:34:03 -0500557 ":create_sksl_enums",
Ethan Nicholas762466e2017-06-29 10:03:38 -0400558 ":skslc(//gn/toolchain:$host_toolchain)",
559 ]
560 sources = skia_gpu_processor_sources
561 outputs = skia_gpu_processor_outputs
562 skslc_path = "$root_out_dir/"
563 if (host_toolchain != default_toolchain_name) {
564 skslc_path += "$host_toolchain/"
565 }
566 skslc_path += "skslc"
567 if (host_os == "win") {
568 skslc_path += ".exe"
569 }
Ethan Nicholasb9f6afb2017-07-27 16:02:37 -0400570 args = [
571 rebase_path(skslc_path),
Eric Borenb121be72017-07-28 10:00:51 -0400572 rebase_path("bin/clang-format"),
Ethan Nicholasb9f6afb2017-07-27 16:02:37 -0400573 ]
Ethan Nicholas762466e2017-06-29 10:03:38 -0400574 args += rebase_path(skia_gpu_processor_sources)
575 }
576} else {
577 skia_gpu_processor_outputs = []
578 group("compile_processors") {
579 }
580}
581
mtklein06c35c02016-09-20 12:28:12 -0700582optional("gpu") {
583 enabled = skia_enable_gpu
Ethan Nicholas762466e2017-06-29 10:03:38 -0400584 deps = [
585 ":compile_processors",
Ethan Nicholas5b5f0962017-09-11 13:50:14 -0700586 ":run_sksllex",
Ethan Nicholas762466e2017-06-29 10:03:38 -0400587 ]
Adrienne Walker1df7cd82018-04-18 13:46:25 -0700588 if (skia_generate_workarounds) {
589 deps += [ ":workaround_list" ]
590 }
mtkleine9fb3d52016-09-20 15:11:46 -0700591 public_defines = []
592
Brian Salomon3d6801e2017-12-11 10:06:31 -0500593 sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs
mtklein06c35c02016-09-20 12:28:12 -0700594
595 # These paths need to be absolute to match the ones produced by shared_sources.gni.
Brian Salomon3d6801e2017-12-11 10:06:31 -0500596 sources -= get_path_info([ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ],
mtklein06c35c02016-09-20 12:28:12 -0700597 "abspath")
Mike Klein703cf5a2016-10-13 17:18:04 -0400598 libs = []
mtklein06c35c02016-09-20 12:28:12 -0700599 if (is_android) {
Hal Canary25375e82018-03-14 15:16:56 -0400600 sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]
Derek Sollenberger7a869872017-06-27 15:37:25 -0400601
602 # this lib is required to link against AHardwareBuffer
603 if (defined(ndk_api) && ndk_api >= 26) {
604 libs += [ "android" ]
605 }
Kevin Lubick4a24e102017-03-29 11:19:01 -0400606 } else if (skia_use_egl) {
Brian Salomon3d6801e2017-12-11 10:06:31 -0500607 sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]
Kevin Lubick4a24e102017-03-29 11:19:01 -0400608 libs += [ "EGL" ]
mtklein06c35c02016-09-20 12:28:12 -0700609 } else if (is_linux) {
Brian Salomon3d6801e2017-12-11 10:06:31 -0500610 sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
Mike Kleina979a1d2017-02-23 10:31:13 -0500611 libs += [
612 "GL",
613 "GLU",
614 ]
mtklein06c35c02016-09-20 12:28:12 -0700615 } else if (is_mac) {
Brian Salomon3d6801e2017-12-11 10:06:31 -0500616 sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
Chinmay Garde130a1182016-11-23 11:43:56 -0800617 } else if (is_ios) {
Brian Salomon3d6801e2017-12-11 10:06:31 -0500618 sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
Mike Klein703cf5a2016-10-13 17:18:04 -0400619 } else if (is_win) {
Brian Salomon3d6801e2017-12-11 10:06:31 -0500620 sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
Mike Klein703cf5a2016-10-13 17:18:04 -0400621 libs += [ "OpenGL32.lib" ]
mtklein06c35c02016-09-20 12:28:12 -0700622 } else {
Brian Salomon3d6801e2017-12-11 10:06:31 -0500623 sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
mtklein06c35c02016-09-20 12:28:12 -0700624 }
mtkleine9fb3d52016-09-20 15:11:46 -0700625
626 if (skia_use_vulkan) {
627 public_defines += [ "SK_VULKAN" ]
628 sources += skia_vk_sources
egdaniele4a9bd72016-09-21 07:36:14 -0700629 if (skia_enable_vulkan_debug_layers) {
630 public_defines += [ "SK_ENABLE_VK_LAYERS" ]
631 }
Greg Danielafb7ec72017-12-07 12:48:30 -0500632 if (skia_vulkan_header != "") {
633 public_defines += [ "SK_VULKAN_HEADER=\"$skia_vulkan_header\"" ]
634 } else {
635 if (is_skia_dev_build) {
636 public_defines += [ "SK_VULKAN_HEADER=\"GrVulkanDefines.h\"" ]
637 }
638 }
mtkleine9fb3d52016-09-20 15:11:46 -0700639 }
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500640 if (skia_use_legacy_gpu_pixel_ops) {
641 public_defines += [ "SK_LEGACY_GPU_PIXEL_OPS" ]
642 }
Ethan Nicholasa6ae1f72017-03-16 09:56:54 -0400643 if (skia_enable_spirv_validation) {
Ethan Nicholas762466e2017-06-29 10:03:38 -0400644 deps += [ "//third_party/spirv-tools" ]
Ethan Nicholasa6ae1f72017-03-16 09:56:54 -0400645 public_defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
646 }
Greg Daniele5ddff52017-07-05 16:49:36 -0400647
Greg Daniel6b7e0e22017-07-12 16:21:09 -0400648 cflags_objcc = []
Greg Daniele5ddff52017-07-05 16:49:36 -0400649 if (skia_use_metal) {
650 public_defines += [ "SK_METAL" ]
651 sources += skia_metal_sources
652 libs += [ "Metal.framework" ]
Greg Daniel6b7e0e22017-07-12 16:21:09 -0400653 cflags_objcc += [ "-fobjc-arc" ]
Greg Daniele5ddff52017-07-05 16:49:36 -0400654 }
Brian Salomoncbcb0a12017-11-19 13:20:13 -0500655
656 if (skia_enable_atlas_text) {
657 sources += skia_atlas_text_sources
658 }
mtklein06c35c02016-09-20 12:28:12 -0700659}
660
Leon Scroggins III04be2b52017-08-17 15:13:20 -0400661optional("heif") {
662 enabled = skia_use_libheif
663 public_defines = [ "SK_HAS_HEIF_LIBRARY" ]
664
665 deps = []
666
667 sources = [
668 "src/codec/SkHeifCodec.cpp",
669 ]
670}
671
mtklein63213812016-08-24 09:55:56 -0700672optional("jpeg") {
673 enabled = skia_use_libjpeg_turbo
674 public_defines = [ "SK_HAS_JPEG_LIBRARY" ]
675
mtklein63213812016-08-24 09:55:56 -0700676 deps = [
677 "//third_party/libjpeg-turbo:libjpeg",
678 ]
679 sources = [
680 "src/codec/SkJpegCodec.cpp",
681 "src/codec/SkJpegDecoderMgr.cpp",
682 "src/codec/SkJpegUtility.cpp",
mtklein63213812016-08-24 09:55:56 -0700683 "src/images/SkJPEGWriteUtility.cpp",
Matt Sarett04c37312017-05-05 14:02:13 -0400684 "src/images/SkJpegEncoder.cpp",
mtklein63213812016-08-24 09:55:56 -0700685 ]
686}
687
688optional("pdf") {
Hal Canary43fb7a02016-12-30 13:09:03 -0500689 enabled = skia_use_zlib && skia_enable_pdf
690 public_defines = [ "SK_SUPPORT_PDF" ]
mtklein63213812016-08-24 09:55:56 -0700691
mtklein63213812016-08-24 09:55:56 -0700692 deps = [
693 "//third_party/zlib",
694 ]
Hal Canary83e0f1b2018-04-05 16:58:41 -0400695 if (skia_use_libjpeg_turbo) {
Adrienne Walker1df7cd82018-04-18 13:46:25 -0700696 deps += [ ":jpeg" ]
Hal Canary83e0f1b2018-04-05 16:58:41 -0400697 }
brettwb9447282016-09-01 14:24:39 -0700698 sources = skia_pdf_sources
mtkleincd01b032016-08-31 04:58:19 -0700699 sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
mtklein63213812016-08-24 09:55:56 -0700700
701 if (skia_use_sfntly) {
702 deps += [ "//third_party/sfntly" ]
Hal Canary43fb7a02016-12-30 13:09:03 -0500703 public_defines += [ "SK_PDF_USE_SFNTLY" ]
mtklein63213812016-08-24 09:55:56 -0700704 }
705}
706
707optional("png") {
708 enabled = skia_use_libpng
709 public_defines = [ "SK_HAS_PNG_LIBRARY" ]
710
mtklein63213812016-08-24 09:55:56 -0700711 deps = [
712 "//third_party/libpng",
713 ]
714 sources = [
715 "src/codec/SkIcoCodec.cpp",
716 "src/codec/SkPngCodec.cpp",
Matt Sarett04c37312017-05-05 14:02:13 -0400717 "src/images/SkPngEncoder.cpp",
mtklein63213812016-08-24 09:55:56 -0700718 ]
719}
720
scroggof84ad642016-10-31 09:02:57 -0700721optional("raw") {
Mike Klein10d665d2016-11-01 11:46:10 -0400722 enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo && skia_use_piex
scroggof84ad642016-10-31 09:02:57 -0700723 public_defines = [ "SK_CODEC_DECODES_RAW" ]
724
725 deps = [
726 "//third_party/dng_sdk",
727 "//third_party/libjpeg-turbo:libjpeg",
728 "//third_party/piex",
729 ]
730
731 # SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of
732 # Skia.
733 configs_to_remove = [ "//gn:no_exceptions" ]
734
735 sources = [
736 "src/codec/SkRawAdapterCodec.cpp",
737 "src/codec/SkRawCodec.cpp",
738 ]
739}
740
Mike Kleinfb333552018-01-25 12:49:37 -0500741optional("skcms") {
742 enabled = skia_use_skcms
743
Brian Osman094fba92018-03-26 17:05:48 -0400744 public_defines = [ "SK_USE_SKCMS" ]
Mike Kleinfb333552018-01-25 12:49:37 -0500745 deps = [
746 "//third_party/skcms",
747 ]
748 sources = [
Brian Osman094fba92018-03-26 17:05:48 -0400749 "src/core/SkColorSpaceXform_skcms.cpp",
Mike Kleinfb333552018-01-25 12:49:37 -0500750 ]
751}
752
mtklein3cc22182016-08-29 13:26:14 -0700753optional("typeface_freetype") {
754 enabled = skia_use_freetype
mtklein3cc22182016-08-29 13:26:14 -0700755
756 deps = [
757 "//third_party/freetype2",
758 ]
759 sources = [
760 "src/ports/SkFontHost_FreeType.cpp",
761 "src/ports/SkFontHost_FreeType_common.cpp",
762 ]
763}
764
mtklein457b42a2016-08-23 13:56:37 -0700765optional("webp") {
766 enabled = skia_use_libwebp
767 public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
768
mtklein457b42a2016-08-23 13:56:37 -0700769 deps = [
770 "//third_party/libwebp",
771 ]
772 sources = [
773 "src/codec/SkWebpAdapterCodec.cpp",
774 "src/codec/SkWebpCodec.cpp",
Matt Sarett04c37312017-05-05 14:02:13 -0400775 "src/images/SkWebpEncoder.cpp",
mtklein457b42a2016-08-23 13:56:37 -0700776 ]
mtkleineb3c4252016-08-23 07:38:09 -0700777}
778
mtklein63213812016-08-24 09:55:56 -0700779optional("xml") {
780 enabled = skia_use_expat
Florin Malita442fff92016-11-08 16:07:52 +0000781 public_defines = [ "SK_XML" ]
mtklein63213812016-08-24 09:55:56 -0700782
mtklein63213812016-08-24 09:55:56 -0700783 deps = [
784 "//third_party/expat",
785 ]
786 sources = [
Mike Kleinbd41bcc2017-02-09 16:38:15 -0500787 "src/svg/SkSVGCanvas.cpp",
788 "src/svg/SkSVGDevice.cpp",
mtklein63213812016-08-24 09:55:56 -0700789 "src/xml/SkDOM.cpp",
790 "src/xml/SkXMLParser.cpp",
791 "src/xml/SkXMLWriter.cpp",
792 ]
793}
794
Adrienne Walker1df7cd82018-04-18 13:46:25 -0700795if (skia_enable_gpu && skia_generate_workarounds) {
796 action("workaround_list") {
797 script = "tools/build_workaround_header.py"
798
799 inputs = [
800 "src/gpu/gpu_workaround_list.txt",
801 ]
802
803 # see comments in skia_compile_processors about out dir path shenanigans.
804 output_file =
805 rebase_path("src/gpu/GrDriverBugWorkaroundsAutogen.h", root_out_dir)
806
807 outputs = [
808 "$root_out_dir/$output_file",
809 ]
810 args = [
811 "--output-file",
812 "$output_file",
813 ]
814
815 foreach(file, inputs) {
816 args += [ rebase_path(file, root_build_dir) ]
817 }
818 }
819}
820
mtkleinc04ff472016-06-23 10:29:30 -0700821component("skia") {
822 public_configs = [ ":skia_public" ]
823 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700824
825 deps = [
anmittalb8b3f712016-08-25 04:55:19 -0700826 ":arm64",
827 ":armv7",
mtklein9b8583d2016-08-24 17:32:30 -0700828 ":avx",
anmittalb8b3f712016-08-25 04:55:19 -0700829 ":crc32",
Mike Kleina04bb452017-02-09 12:24:07 -0500830 ":effects",
mtkleina45be612016-08-29 15:22:10 -0700831 ":fontmgr_android",
mtkleind2e39db2016-09-07 07:52:55 -0700832 ":fontmgr_custom",
Hal Canaryff2742e2018-01-30 11:35:47 -0500833 ":fontmgr_empty",
mtklein3cc22182016-08-29 13:26:14 -0700834 ":fontmgr_fontconfig",
mtkleincdedd0e2016-09-12 15:15:44 -0700835 ":fontmgr_fuchsia",
mtklein06c35c02016-09-20 12:28:12 -0700836 ":gpu",
Leon Scroggins III04be2b52017-08-17 15:13:20 -0400837 ":heif",
Mike Klein1b9b7d52018-02-27 10:37:40 -0500838 ":hsw",
mtklein63213812016-08-24 09:55:56 -0700839 ":jpeg",
mtklein9b8583d2016-08-24 17:32:30 -0700840 ":none",
mtklein63213812016-08-24 09:55:56 -0700841 ":pdf",
842 ":png",
scroggof84ad642016-10-31 09:02:57 -0700843 ":raw",
Mike Kleinfb333552018-01-25 12:49:37 -0500844 ":skcms",
mtklein9b8583d2016-08-24 17:32:30 -0700845 ":sse2",
846 ":sse41",
847 ":sse42",
848 ":ssse3",
mtkleineb3c4252016-08-23 07:38:09 -0700849 ":webp",
mtklein63213812016-08-24 09:55:56 -0700850 ":xml",
mtkleinc04ff472016-06-23 10:29:30 -0700851 ]
852
Chinmay Garde43f115c2016-11-16 15:04:12 -0800853 # This file (and all GN files in Skia) are designed to work with an
854 # empty sources assignment filter; we handle all that explicitly.
855 # We clear the filter here for clients who may have set up a global filter.
856 set_sources_assignment_filter([])
857
mtkleinc04ff472016-06-23 10:29:30 -0700858 sources = []
brettwb9447282016-09-01 14:24:39 -0700859 sources += skia_core_sources
brettwb9447282016-09-01 14:24:39 -0700860 sources += skia_utils_sources
Hal Canary6ad3d2f2016-12-20 16:15:56 -0500861 sources += skia_xps_sources
mtkleinc04ff472016-06-23 10:29:30 -0700862 sources += [
Stan Iliev73d8fd92017-08-02 15:36:24 -0400863 "src/android/SkAndroidFrameworkUtils.cpp",
Leon Scroggins III42ee2842018-01-14 14:46:51 -0500864 "src/android/SkAnimatedImage.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700865 "src/android/SkBitmapRegionCodec.cpp",
866 "src/android/SkBitmapRegionDecoder.cpp",
867 "src/codec/SkAndroidCodec.cpp",
Leon Scroggins IIId81fed92017-06-01 13:42:28 -0400868 "src/codec/SkBmpBaseCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700869 "src/codec/SkBmpCodec.cpp",
870 "src/codec/SkBmpMaskCodec.cpp",
871 "src/codec/SkBmpRLECodec.cpp",
872 "src/codec/SkBmpStandardCodec.cpp",
873 "src/codec/SkCodec.cpp",
874 "src/codec/SkCodecImageGenerator.cpp",
scroggo19b91532016-10-24 09:03:26 -0700875 "src/codec/SkGifCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700876 "src/codec/SkMaskSwizzler.cpp",
877 "src/codec/SkMasks.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700878 "src/codec/SkSampledCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700879 "src/codec/SkSampler.cpp",
scroggo19b91532016-10-24 09:03:26 -0700880 "src/codec/SkStreamBuffer.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700881 "src/codec/SkSwizzler.cpp",
882 "src/codec/SkWbmpCodec.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700883 "src/images/SkImageEncoder.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700884 "src/ports/SkDiscardableMemory_none.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700885 "src/ports/SkImageGenerator_skia.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700886 "src/ports/SkMemory_malloc.cpp",
887 "src/ports/SkOSFile_stdio.cpp",
888 "src/sfnt/SkOTTable_name.cpp",
889 "src/sfnt/SkOTUtils.cpp",
890 "src/utils/mac/SkStream_mac.cpp",
scroggo3d3a65c2016-10-24 12:28:30 -0700891 "third_party/gif/SkGifImageReader.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700892 ]
brettwb9447282016-09-01 14:24:39 -0700893
mtklein7d6fb2c2016-08-25 14:50:44 -0700894 libs = []
895
mtkleinc04ff472016-06-23 10:29:30 -0700896 if (is_win) {
897 sources += [
Mike Kleinae7e6712016-10-11 17:49:33 -0400898 "src/fonts/SkFontMgr_indirect.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700899 "src/ports/SkDebug_win.cpp",
900 "src/ports/SkFontHost_win.cpp",
901 "src/ports/SkFontMgr_win_dw.cpp",
Mike Klein0c5fdcb2017-11-13 12:40:46 -0500902 "src/ports/SkFontMgr_win_dw_factory.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700903 "src/ports/SkImageEncoder_WIC.cpp",
904 "src/ports/SkImageGeneratorWIC.cpp",
905 "src/ports/SkOSFile_win.cpp",
mtklein605d9522016-09-21 14:01:32 -0700906 "src/ports/SkOSLibrary_win.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700907 "src/ports/SkScalerContext_win_dw.cpp",
908 "src/ports/SkTLS_win.cpp",
909 "src/ports/SkTypeface_win_dw.cpp",
910 ]
Mike Klein4b167fc2016-10-11 18:13:53 -0400911 libs += [
912 "FontSub.lib",
Mike Klein0c5fdcb2017-11-13 12:40:46 -0500913 "Gdi32.lib",
Mike Klein4b167fc2016-10-11 18:13:53 -0400914 "Ole32.lib",
915 "OleAut32.lib",
916 "User32.lib",
Mike Klein0c5fdcb2017-11-13 12:40:46 -0500917 "Usp10.lib",
Mike Klein4b167fc2016-10-11 18:13:53 -0400918 ]
mtkleinc04ff472016-06-23 10:29:30 -0700919 } else {
920 sources += [
mtkleinc04ff472016-06-23 10:29:30 -0700921 "src/ports/SkOSFile_posix.cpp",
mtklein605d9522016-09-21 14:01:32 -0700922 "src/ports/SkOSLibrary_posix.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700923 "src/ports/SkTLS_pthread.cpp",
924 ]
Ben Wagnerbe6ae5b2017-08-31 16:45:23 -0400925 libs += [ "dl" ]
mtkleinc04ff472016-06-23 10:29:30 -0700926 }
927
mtklein7d6fb2c2016-08-25 14:50:44 -0700928 if (is_android) {
Mike Klein1c471872017-01-13 15:27:45 -0500929 deps += [ "//third_party/expat" ]
Mike Kleine459afd2017-03-03 09:21:30 -0500930 if (defined(ndk) && ndk != "") {
Mike Klein1c471872017-01-13 15:27:45 -0500931 deps += [ "//third_party/cpu-features" ]
932 }
mtklein06c35c02016-09-20 12:28:12 -0700933 sources += [ "src/ports/SkDebug_android.cpp" ]
mtklein7d6fb2c2016-08-25 14:50:44 -0700934 libs += [
935 "EGL",
936 "GLESv2",
937 "log",
938 ]
939 }
940
mtkleinc04ff472016-06-23 10:29:30 -0700941 if (is_linux) {
mtklein06c35c02016-09-20 12:28:12 -0700942 sources += [ "src/ports/SkDebug_stdio.cpp" ]
Hal Canary25375e82018-03-14 15:16:56 -0400943 if (skia_use_egl) {
944 libs += [ "GLESv2" ]
945 }
mtkleinc04ff472016-06-23 10:29:30 -0700946 }
947
948 if (is_mac) {
949 sources += [
mtklein7d6fb2c2016-08-25 14:50:44 -0700950 "src/ports/SkDebug_stdio.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700951 "src/ports/SkFontHost_mac.cpp",
952 "src/ports/SkImageEncoder_CG.cpp",
953 "src/ports/SkImageGeneratorCG.cpp",
954 ]
mtklein09e61f72016-08-23 13:35:28 -0700955 libs += [
bungeman3e306f62017-03-29 11:32:02 -0400956 # AppKit symbols NSFontWeightXXX may be dlsym'ed.
957 "AppKit.framework",
mtklein09e61f72016-08-23 13:35:28 -0700958 "ApplicationServices.framework",
959 "OpenGL.framework",
960 ]
mtkleinc04ff472016-06-23 10:29:30 -0700961 }
abarth6fc8ff02016-07-15 15:15:15 -0700962
Mike Klein7d302882016-11-03 14:06:31 -0400963 if (is_ios) {
964 sources += [
965 "src/ports/SkDebug_stdio.cpp",
966 "src/ports/SkFontHost_mac.cpp",
967 "src/ports/SkImageEncoder_CG.cpp",
968 "src/ports/SkImageGeneratorCG.cpp",
969 ]
970 libs += [
971 "CoreFoundation.framework",
972 "CoreGraphics.framework",
973 "CoreText.framework",
974 "ImageIO.framework",
975 "MobileCoreServices.framework",
bungeman3e306f62017-03-29 11:32:02 -0400976
977 # UIKit symbols UIFontWeightXXX may be dlsym'ed.
978 "UIKit.framework",
Mike Klein7d302882016-11-03 14:06:31 -0400979 ]
980 }
981
abarth6fc8ff02016-07-15 15:15:15 -0700982 if (is_fuchsia) {
mtklein06c35c02016-09-20 12:28:12 -0700983 sources += [ "src/ports/SkDebug_stdio.cpp" ]
abarth6fc8ff02016-07-15 15:15:15 -0700984 }
mtkleinc04ff472016-06-23 10:29:30 -0700985}
986
mtkleinc095df52016-08-24 12:23:52 -0700987# Targets guarded by skia_enable_tools may use //third_party freely.
988if (skia_enable_tools) {
Mike Klein308b5ac2016-12-06 16:03:52 -0500989 # Used by gn_to_bp.py to list our public include dirs.
990 source_set("public") {
991 configs += [ ":skia_public" ]
992 }
993
Mike Kleinc36dedf2016-11-18 09:35:28 -0500994 config("skia.h_config") {
995 include_dirs = [ "$target_gen_dir" ]
Greg Danielafb7ec72017-12-07 12:48:30 -0500996 if (skia_use_vulkan) {
997 # So we can get the header which includes vulkan
998 include_dirs += [ "tools/gpu/vk" ]
999 }
Mike Kleinc36dedf2016-11-18 09:35:28 -05001000 }
1001 action("skia.h") {
1002 public_configs = [ ":skia.h_config" ]
1003 skia_h = "$target_gen_dir/skia.h"
1004 script = "gn/find_headers.py"
Greg Danielc819e662017-04-19 16:39:45 -04001005 args = [ rebase_path(skia_h, root_build_dir) ] +
Robert Phillipsfcd5fdd2017-06-14 01:43:29 +00001006 rebase_path(skia_public_includes)
Mike Kleinc36dedf2016-11-18 09:35:28 -05001007 depfile = "$skia_h.deps"
1008 outputs = [
1009 skia_h,
1010 ]
1011 }
1012
1013 if (skia_enable_gpu && target_cpu == "x64") {
Mike Kleinc36dedf2016-11-18 09:35:28 -05001014 executable("fiddle") {
1015 libs = []
Mike Kleinc36dedf2016-11-18 09:35:28 -05001016 sources = [
Mike Kleinc36dedf2016-11-18 09:35:28 -05001017 "tools/fiddle/draw.cpp",
1018 "tools/fiddle/fiddle_main.cpp",
1019 ]
Joe Gregorioa8fabd32017-05-31 09:45:19 -04001020
1021 if (skia_use_egl) {
1022 sources += [ "tools/fiddle/egl_context.cpp" ]
Joe Gregorioa8fabd32017-05-31 09:45:19 -04001023 } else {
1024 sources += [ "tools/fiddle/null_context.cpp" ]
1025 }
Joe Gregorio1e735c02017-04-19 14:05:14 -04001026 testonly = true
Mike Kleinc36dedf2016-11-18 09:35:28 -05001027 deps = [
Joe Gregorio1e735c02017-04-19 14:05:14 -04001028 ":flags",
Robert Phillips57e08282017-11-16 14:59:48 -05001029 ":gpu_tool_utils",
Mike Kleinc36dedf2016-11-18 09:35:28 -05001030 ":skia",
1031 ":skia.h",
1032 ]
1033 }
1034 }
1035
1036 if (skia_enable_gpu) {
1037 source_set("public_headers_warnings_check") {
1038 sources = [
1039 "tools/public_headers_warnings_check.cpp",
1040 ]
1041 configs -= [ "//gn:warnings_except_public_headers" ]
1042 deps = [
1043 ":skia",
1044 ":skia.h",
1045 ]
1046 }
1047 }
1048
mtkleinc095df52016-08-24 12:23:52 -07001049 template("test_lib") {
1050 config(target_name + "_config") {
1051 include_dirs = invoker.public_include_dirs
mtkleina627b5c2016-09-20 13:36:47 -07001052 if (defined(invoker.public_defines)) {
1053 defines = invoker.public_defines
1054 }
mtklein25c81d42016-07-27 13:55:26 -07001055 }
mtkleinc095df52016-08-24 12:23:52 -07001056 source_set(target_name) {
1057 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
1058 public_configs = [
1059 ":" + target_name + "_config",
1060 ":skia_private",
1061 ]
1062
1063 if (!defined(deps)) {
1064 deps = []
1065 }
1066 deps += [ ":skia" ]
1067 testonly = true
1068 }
mtklein25c81d42016-07-27 13:55:26 -07001069 }
mtklein25c81d42016-07-27 13:55:26 -07001070
Mike Kleine6682eb2017-01-05 10:54:57 -05001071 template("test_app") {
Jim Van Verth443a9132017-11-28 09:45:26 -05001072 if (is_ios) {
1073 app_name = target_name
1074 gen_path = target_gen_dir
1075
1076 action("${app_name}_generate_info_plist") {
1077 script = "//gn/gen_plist_ios.py"
1078 outputs = [
1079 "$gen_path/${app_name}_Info.plist",
1080 ]
1081 args = [ rebase_path("$gen_path/$app_name", root_build_dir) ]
1082 }
1083
1084 bundle_data("${app_name}_bundle_info_plist") {
1085 public_deps = [
1086 ":${app_name}_generate_info_plist",
1087 ]
1088 sources = [
1089 "$gen_path/${app_name}_Info.plist",
1090 ]
1091 outputs = [
1092 "{{bundle_root_dir}}/Info.plist",
1093 ]
1094 }
1095
Jim Van Verth329c5a62017-11-29 11:42:33 -05001096 bundle_ios_data =
1097 defined(invoker.bundle_ios_data) && invoker.bundle_ios_data
1098
1099 if (bundle_ios_data) {
1100 has_skps =
1101 "True" == exec_script("//gn/checkdir.py",
1102 [ rebase_path("skps", root_build_dir) ],
1103 "trim string")
1104 bundle_data("${app_name}_bundle_resources") {
1105 sources = [
1106 "resources",
1107 ]
1108 outputs = [
1109 # iOS reserves the folders 'Resources' and 'resources' so store one level deeper
1110 "{{bundle_resources_dir}}/data/resources",
1111 ]
1112 }
1113
1114 if (has_skps) {
1115 bundle_data("${app_name}_bundle_skps") {
1116 sources = [
1117 "skps",
1118 ]
1119 outputs = [
1120 # Store in same folder as resources
1121 "{{bundle_resources_dir}}/data/skps",
1122 ]
1123 }
1124 }
1125 }
1126
Jim Van Verth443a9132017-11-28 09:45:26 -05001127 executable("${app_name}_generate_executable") {
1128 forward_variables_from(invoker,
1129 "*",
1130 [
1131 "output_name",
1132 "visibility",
1133 "is_shared_library",
1134 ])
Mike Klein154e6da2017-07-26 15:13:47 -04001135 configs += [ ":skia_private" ]
Mike Kleine6682eb2017-01-05 10:54:57 -05001136 testonly = true
Jim Van Verth443a9132017-11-28 09:45:26 -05001137 output_name = rebase_path("$gen_path/$app_name", root_build_dir)
1138 }
1139
1140 bundle_data("${app_name}_bundle_executable") {
1141 public_deps = [
1142 ":${app_name}_generate_executable",
1143 ]
1144 sources = [
1145 "$gen_path/$app_name",
1146 ]
1147 outputs = [
1148 "{{bundle_executable_dir}}/$app_name",
1149 ]
1150 testonly = true
1151 }
1152
1153 create_bundle("$app_name") {
1154 product_type = "com.apple.product-type.application"
1155 testonly = true
1156
1157 bundle_root_dir = "${root_build_dir}/${target_name}.app"
1158 bundle_resources_dir = bundle_root_dir
1159 bundle_executable_dir = bundle_root_dir
1160 bundle_plugins_dir = bundle_root_dir + "/Plugins"
1161
1162 deps = [
1163 ":${app_name}_bundle_executable",
1164 ":${app_name}_bundle_info_plist",
1165 ]
Jim Van Verth329c5a62017-11-29 11:42:33 -05001166 if (bundle_ios_data) {
1167 deps += [ ":${app_name}_bundle_resources" ]
1168 if (has_skps) {
1169 deps += [ ":${app_name}_bundle_skps" ]
1170 }
1171 }
Jim Van Verth443a9132017-11-28 09:45:26 -05001172
1173 # should only code sign when running on a device, not the simulator
1174 if (target_cpu != "x64") {
1175 code_signing_script = "//gn/codesign_ios.py"
1176 code_signing_sources = [ "$target_gen_dir/$app_name" ]
1177 code_signing_outputs = [
1178 "$bundle_root_dir/_CodeSignature/CodeResources",
1179 "$bundle_root_dir/embedded.mobileprovision",
1180 ]
Jim Van Verth4e502972017-12-07 15:16:10 -05001181 code_signing_args = [
1182 rebase_path("$bundle_root_dir", root_build_dir),
1183 skia_ios_identity,
1184 skia_ios_profile,
1185 ]
Jim Van Verth443a9132017-11-28 09:45:26 -05001186 }
Mike Kleine6682eb2017-01-05 10:54:57 -05001187 }
1188 } else {
Jim Van Verth443a9132017-11-28 09:45:26 -05001189 # !is_ios
1190
1191 if (defined(invoker.is_shared_library) && invoker.is_shared_library) {
1192 shared_library("lib" + target_name) {
1193 forward_variables_from(invoker, "*", [ "is_shared_library" ])
1194 configs += [ ":skia_private" ]
1195 testonly = true
1196 }
1197 } else {
1198 _executable = target_name
1199 executable(_executable) {
1200 forward_variables_from(invoker, "*", [ "is_shared_library" ])
1201 configs += [ ":skia_private" ]
1202 testonly = true
1203 }
Mike Kleine6682eb2017-01-05 10:54:57 -05001204 }
Jim Van Verth443a9132017-11-28 09:45:26 -05001205 if (is_android && skia_android_serial != "" && defined(_executable)) {
1206 action("push_" + target_name) {
1207 script = "gn/push_to_android.py"
1208 deps = [
1209 ":" + _executable,
1210 ]
1211 _stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial"
1212 outputs = [
1213 _stamp,
1214 ]
1215 args = [
1216 rebase_path("$root_build_dir/$_executable"),
1217 skia_android_serial,
1218 rebase_path(_stamp),
1219 ]
1220 testonly = true
1221 }
Mike Klein7d921032017-01-05 12:20:41 -05001222 }
1223 }
Mike Kleine6682eb2017-01-05 10:54:57 -05001224 }
1225
mtkleinc095df52016-08-24 12:23:52 -07001226 test_lib("gpu_tool_utils") {
mtklein38925aa2016-09-21 10:11:25 -07001227 public_include_dirs = []
1228 if (skia_enable_gpu) {
1229 public_defines = []
1230 public_include_dirs += [ "tools/gpu" ]
mtkleind68f9b02016-09-23 13:18:41 -07001231
1232 deps = []
mtklein38925aa2016-09-21 10:11:25 -07001233 sources = [
1234 "tools/gpu/GrContextFactory.cpp",
1235 "tools/gpu/GrTest.cpp",
Brian Salomon58389b92018-03-07 13:01:25 -05001236 "tools/gpu/ProxyUtils.cpp",
mtklein38925aa2016-09-21 10:11:25 -07001237 "tools/gpu/TestContext.cpp",
Brian Salomoncbcb0a12017-11-19 13:20:13 -05001238 "tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp",
mtklein38925aa2016-09-21 10:11:25 -07001239 "tools/gpu/gl/GLTestContext.cpp",
mtklein605d9522016-09-21 14:01:32 -07001240 "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
mtklein38925aa2016-09-21 10:11:25 -07001241 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
1242 "tools/gpu/gl/debug/GrBufferObj.cpp",
1243 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
1244 "tools/gpu/gl/debug/GrProgramObj.cpp",
1245 "tools/gpu/gl/debug/GrShaderObj.cpp",
1246 "tools/gpu/gl/debug/GrTextureObj.cpp",
1247 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
1248 "tools/gpu/gl/null/NullGLTestContext.cpp",
Brian Salomoncfe910d2017-07-06 16:40:18 -04001249 "tools/gpu/mock/MockTestContext.cpp",
mtklein38925aa2016-09-21 10:11:25 -07001250 ]
1251 libs = []
mtklein25c81d42016-07-27 13:55:26 -07001252
Kevin Lubick4a24e102017-03-29 11:19:01 -04001253 if (is_android || skia_use_egl) {
mtklein38925aa2016-09-21 10:11:25 -07001254 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
Mike Klein7d302882016-11-03 14:06:31 -04001255 } else if (is_ios) {
1256 sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
1257 libs += [ "OpenGLES.framework" ]
mtklein38925aa2016-09-21 10:11:25 -07001258 } else if (is_linux) {
1259 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
Mike Kleina979a1d2017-02-23 10:31:13 -05001260 libs += [ "X11" ]
mtklein38925aa2016-09-21 10:11:25 -07001261 } else if (is_mac) {
1262 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
Mike Klein4b167fc2016-10-11 18:13:53 -04001263 } else if (is_win) {
1264 sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
1265 libs += [
1266 "Gdi32.lib",
1267 "OpenGL32.lib",
1268 ]
mtklein38925aa2016-09-21 10:11:25 -07001269 }
mtklein6ef69992016-09-14 06:12:09 -07001270
Greg Daniel6b7e0e22017-07-12 16:21:09 -04001271 cflags_objcc = [ "-fobjc-arc" ]
1272
Mike Kleinc168a3a2016-11-14 14:53:13 +00001273 if (skia_use_angle) {
Mike Kleinc168a3a2016-11-14 14:53:13 +00001274 deps += [ "//third_party/angle2" ]
1275 sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
1276 }
mtkleind68f9b02016-09-23 13:18:41 -07001277 if (skia_use_vulkan) {
1278 sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
Greg Daniel35970ec2017-11-10 10:03:05 -05001279 sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
mtkleind68f9b02016-09-23 13:18:41 -07001280 }
Greg Danielb76a72a2017-07-13 15:07:54 -04001281 if (skia_use_metal) {
1282 sources += [ "tools/gpu/mtl/MtlTestContext.mm" ]
1283 }
mtkleina627b5c2016-09-20 13:36:47 -07001284 }
mtklein25c81d42016-07-27 13:55:26 -07001285 }
mtklein25c81d42016-07-27 13:55:26 -07001286
mtkleinc095df52016-08-24 12:23:52 -07001287 test_lib("flags") {
1288 public_include_dirs = [ "tools/flags" ]
1289 sources = [
1290 "tools/flags/SkCommandLineFlags.cpp",
mtklein046cb562016-09-16 10:23:12 -07001291 ]
1292 }
1293 test_lib("common_flags") {
1294 public_include_dirs = [ "tools/flags" ]
1295 sources = [
mtkleinc095df52016-08-24 12:23:52 -07001296 "tools/flags/SkCommonFlags.cpp",
1297 "tools/flags/SkCommonFlagsConfig.cpp",
1298 ]
1299 deps = [
mtklein046cb562016-09-16 10:23:12 -07001300 ":flags",
mtkleinc095df52016-08-24 12:23:52 -07001301 ":gpu_tool_utils",
1302 ]
1303 }
mtklein25c81d42016-07-27 13:55:26 -07001304
mtkleinc095df52016-08-24 12:23:52 -07001305 test_lib("tool_utils") {
1306 public_include_dirs = [
1307 "tools",
1308 "tools/debugger",
Ben Wagner483c7722018-02-20 17:06:07 -05001309 "tools/fonts",
mtkleinc095df52016-08-24 12:23:52 -07001310 "tools/timer",
Brian Salomondcbb9d92017-07-19 10:53:20 -04001311 "tools/trace",
mtkleinc095df52016-08-24 12:23:52 -07001312 ]
1313 sources = [
mtkleinb37c0342016-09-09 11:07:45 -07001314 "tools/AndroidSkDebugToStdOut.cpp",
mtkleinc095df52016-08-24 12:23:52 -07001315 "tools/CrashHandler.cpp",
mtklein0590fa52016-09-01 07:06:54 -07001316 "tools/LsanSuppressions.cpp",
mtkleinc095df52016-08-24 12:23:52 -07001317 "tools/ProcStats.cpp",
1318 "tools/Resources.cpp",
mtkleinc095df52016-08-24 12:23:52 -07001319 "tools/UrlDataManager.cpp",
1320 "tools/debugger/SkDebugCanvas.cpp",
1321 "tools/debugger/SkDrawCommand.cpp",
1322 "tools/debugger/SkJsonWriteBuffer.cpp",
Brian Salomon5f33a8c2018-02-26 14:32:39 -05001323 "tools/fonts/SkRandomScalerContext.cpp",
1324 "tools/fonts/SkTestFontMgr.cpp",
Ben Wagner97182cc2018-02-15 10:20:04 -05001325 "tools/fonts/SkTestFontMgr.h",
1326 "tools/fonts/SkTestSVGTypeface.cpp",
1327 "tools/fonts/SkTestSVGTypeface.h",
1328 "tools/fonts/SkTestTypeface.cpp",
1329 "tools/fonts/SkTestTypeface.h",
Brian Salomon5f33a8c2018-02-26 14:32:39 -05001330 "tools/fonts/sk_tool_utils_font.cpp",
mtkleinc095df52016-08-24 12:23:52 -07001331 "tools/picture_utils.cpp",
1332 "tools/random_parse_path.cpp",
1333 "tools/sk_tool_utils.cpp",
mtkleinc095df52016-08-24 12:23:52 -07001334 "tools/timer/Timer.cpp",
Brian Osman53136aa2017-07-20 15:43:35 -04001335 "tools/trace/SkChromeTracingTracer.cpp",
1336 "tools/trace/SkChromeTracingTracer.h",
Brian Salomondcbb9d92017-07-19 10:53:20 -04001337 "tools/trace/SkDebugfTracer.cpp",
1338 "tools/trace/SkDebugfTracer.h",
Brian Osman53136aa2017-07-20 15:43:35 -04001339 "tools/trace/SkEventTracingPriv.cpp",
1340 "tools/trace/SkEventTracingPriv.h",
mtkleinc095df52016-08-24 12:23:52 -07001341 ]
Mike Kleinadacaef2017-02-06 09:26:14 -05001342 libs = []
1343 if (is_ios) {
1344 sources += [ "tools/ios_utils.m" ]
1345 libs += [ "Foundation.framework" ]
1346 }
mtkleinc095df52016-08-24 12:23:52 -07001347 deps = [
mtklein046cb562016-09-16 10:23:12 -07001348 ":common_flags",
Ben Wagner97182cc2018-02-15 10:20:04 -05001349 ":experimental_svg_model",
mtkleinc095df52016-08-24 12:23:52 -07001350 ":flags",
1351 "//third_party/libpng",
1352 ]
1353 public_deps = [
1354 "//third_party/jsoncpp",
1355 ]
1356 }
mtklein25c81d42016-07-27 13:55:26 -07001357
Mike Klein6e744122016-10-27 12:21:40 -04001358 import("gn/gm.gni")
mtkleinc095df52016-08-24 12:23:52 -07001359 test_lib("gm") {
1360 public_include_dirs = [ "gm" ]
1361 sources = gm_sources
1362 deps = [
Florin Malita4aa44412017-12-19 12:21:02 -05001363 ":experimental_sksg",
scroggo19b91532016-10-24 09:03:26 -07001364 ":flags",
mtkleinc095df52016-08-24 12:23:52 -07001365 ":gpu_tool_utils",
1366 ":skia",
1367 ":tool_utils",
1368 ]
1369 }
mtklein25c81d42016-07-27 13:55:26 -07001370
Mike Klein6e744122016-10-27 12:21:40 -04001371 import("gn/tests.gni")
mtkleinc095df52016-08-24 12:23:52 -07001372 test_lib("tests") {
1373 public_include_dirs = [ "tests" ]
Mike Klein6e744122016-10-27 12:21:40 -04001374 sources = tests_sources + pathops_tests_sources
mtkleina45be612016-08-29 15:22:10 -07001375 if (!fontmgr_android_enabled) {
Mike Klein6e744122016-10-27 12:21:40 -04001376 sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ]
mtkleina45be612016-08-29 15:22:10 -07001377 }
mtkleinc095df52016-08-24 12:23:52 -07001378 deps = [
Florin Malita4aa44412017-12-19 12:21:02 -05001379 ":experimental_sksg",
Hal Canary0f666812018-03-22 15:21:12 -04001380 ":experimental_svg_model",
mtkleinc095df52016-08-24 12:23:52 -07001381 ":flags",
mtkleinc095df52016-08-24 12:23:52 -07001382 ":skia",
1383 ":tool_utils",
1384 "//third_party/libpng",
1385 "//third_party/zlib",
1386 ]
Mike Kleind63442d2017-03-27 14:16:04 -04001387 public_deps = [
1388 ":gpu_tool_utils", # Test.h #includes headers from this target.
1389 ]
mtkleinc095df52016-08-24 12:23:52 -07001390 }
mtklein2f3416d2016-08-02 16:02:05 -07001391
Mike Klein6e744122016-10-27 12:21:40 -04001392 import("gn/bench.gni")
mtkleinc095df52016-08-24 12:23:52 -07001393 test_lib("bench") {
1394 public_include_dirs = [ "bench" ]
1395 sources = bench_sources
mtkleinc095df52016-08-24 12:23:52 -07001396 deps = [
1397 ":flags",
1398 ":gm",
1399 ":gpu_tool_utils",
1400 ":skia",
1401 ":tool_utils",
1402 ]
1403 }
mtklein2b6870c2016-07-28 14:17:33 -07001404
Florin Malita54f65c42018-01-16 17:04:30 -05001405 test_lib("experimental_skottie") {
1406 public_include_dirs = [ "experimental/skottie" ]
Florin Malita094ccde2017-12-30 12:27:00 -05001407 include_dirs = [ "tools" ]
1408 sources = [
Florin Malita54f65c42018-01-16 17:04:30 -05001409 "experimental/skottie/Skottie.cpp",
Florin Malitaa6e30f72018-03-23 13:41:58 -04001410 "experimental/skottie/SkottieAdapter.cpp",
Florin Malita54f65c42018-01-16 17:04:30 -05001411 "experimental/skottie/SkottieAnimator.cpp",
Florin Malitacf8ed522018-01-25 15:27:33 -05001412 "experimental/skottie/SkottieParser.cpp",
Florin Malitaa6e30f72018-03-23 13:41:58 -04001413 "experimental/skottie/SkottieValue.cpp",
Florin Malita094ccde2017-12-30 12:27:00 -05001414 ]
1415 deps = [
1416 ":experimental_sksg",
1417 ":skia",
1418 "//third_party/jsoncpp",
1419 ]
1420 }
1421
mtkleinc095df52016-08-24 12:23:52 -07001422 test_lib("experimental_svg_model") {
Hal Canary0f666812018-03-22 15:21:12 -04001423 public_include_dirs = []
1424 if (skia_use_expat) {
1425 public_include_dirs += [ "experimental/svg/model" ]
1426 sources = [
1427 "experimental/svg/model/SkSVGAttribute.cpp",
1428 "experimental/svg/model/SkSVGAttributeParser.cpp",
1429 "experimental/svg/model/SkSVGCircle.cpp",
1430 "experimental/svg/model/SkSVGClipPath.cpp",
1431 "experimental/svg/model/SkSVGContainer.cpp",
1432 "experimental/svg/model/SkSVGDOM.cpp",
1433 "experimental/svg/model/SkSVGEllipse.cpp",
1434 "experimental/svg/model/SkSVGGradient.cpp",
1435 "experimental/svg/model/SkSVGLine.cpp",
1436 "experimental/svg/model/SkSVGLinearGradient.cpp",
1437 "experimental/svg/model/SkSVGNode.cpp",
1438 "experimental/svg/model/SkSVGPath.cpp",
1439 "experimental/svg/model/SkSVGPattern.cpp",
1440 "experimental/svg/model/SkSVGPoly.cpp",
1441 "experimental/svg/model/SkSVGRadialGradient.cpp",
1442 "experimental/svg/model/SkSVGRect.cpp",
1443 "experimental/svg/model/SkSVGRenderContext.cpp",
1444 "experimental/svg/model/SkSVGSVG.cpp",
1445 "experimental/svg/model/SkSVGShape.cpp",
1446 "experimental/svg/model/SkSVGStop.cpp",
1447 "experimental/svg/model/SkSVGTransformableNode.cpp",
1448 "experimental/svg/model/SkSVGUse.cpp",
1449 "experimental/svg/model/SkSVGValue.cpp",
1450 ]
1451 deps = [
1452 ":skia",
1453 ":xml",
1454 ]
1455 }
mtkleinc095df52016-08-24 12:23:52 -07001456 }
fmalitaa2b9fdf2016-08-03 19:53:36 -07001457
Florin Malita4aa44412017-12-19 12:21:02 -05001458 test_lib("experimental_sksg") {
1459 public_include_dirs = [
1460 "experimental/sksg",
1461 "experimental/sksg/effects",
1462 "experimental/sksg/geometry",
1463 "experimental/sksg/paint",
1464 ]
1465 sources = [
1466 "experimental/sksg/SkSGDraw.cpp",
1467 "experimental/sksg/SkSGEffectNode.cpp",
1468 "experimental/sksg/SkSGGeometryNode.cpp",
1469 "experimental/sksg/SkSGGroup.cpp",
Florin Malita49328072018-01-08 12:51:12 -05001470 "experimental/sksg/SkSGImage.cpp",
Florin Malita4aa44412017-12-19 12:21:02 -05001471 "experimental/sksg/SkSGInvalidationController.cpp",
1472 "experimental/sksg/SkSGNode.cpp",
1473 "experimental/sksg/SkSGPaintNode.cpp",
1474 "experimental/sksg/SkSGRenderNode.cpp",
Florin Malita35efaa82018-01-22 12:57:06 -05001475 "experimental/sksg/SkSGScene.cpp",
Florin Malita38ea40e2018-01-29 16:31:14 -05001476 "experimental/sksg/effects/SkSGClipEffect.cpp",
Florin Malita5f9102f2018-01-10 13:36:22 -05001477 "experimental/sksg/effects/SkSGMaskEffect.cpp",
Florin Malitac0034172018-01-08 16:42:59 -05001478 "experimental/sksg/effects/SkSGOpacityEffect.cpp",
Florin Malita4aa44412017-12-19 12:21:02 -05001479 "experimental/sksg/effects/SkSGTransform.cpp",
Florin Malita16d0ad02018-01-19 15:07:29 -05001480 "experimental/sksg/geometry/SkSGGeometryTransform.cpp",
Florin Malitae6345d92018-01-03 23:37:54 -05001481 "experimental/sksg/geometry/SkSGMerge.cpp",
Florin Malita047ae272017-12-27 11:13:13 -05001482 "experimental/sksg/geometry/SkSGPath.cpp",
Florin Malita97b3d2b2018-02-20 11:26:15 -05001483 "experimental/sksg/geometry/SkSGPlane.cpp",
Florin Malita4aa44412017-12-19 12:21:02 -05001484 "experimental/sksg/geometry/SkSGRect.cpp",
Florin Malita51012ce2018-01-31 17:06:59 -05001485 "experimental/sksg/geometry/SkSGText.cpp",
Florin Malita51b8c892018-01-07 08:54:24 -05001486 "experimental/sksg/geometry/SkSGTrimEffect.cpp",
Florin Malita4aa44412017-12-19 12:21:02 -05001487 "experimental/sksg/paint/SkSGColor.cpp",
Florin Malita6aaee592018-01-12 12:25:09 -05001488 "experimental/sksg/paint/SkSGGradient.cpp",
Florin Malita4aa44412017-12-19 12:21:02 -05001489 ]
1490 deps = [
1491 ":skia",
1492 ]
1493 }
1494
Kevin Lubickebf648e2017-09-21 13:45:16 -04001495 if (target_cpu != "wasm") {
1496 test_lib("views") {
1497 public_include_dirs = [ "include/views" ]
1498 sources = [
1499 "src/views/SkEvent.cpp",
1500 "src/views/SkEventSink.cpp",
Kevin Lubickebf648e2017-09-21 13:45:16 -04001501 "src/views/SkTouchGesture.cpp",
1502 "src/views/SkView.cpp",
Brian Osman2dd96932016-10-18 15:33:53 -04001503 ]
Brian Osman34755e22016-12-05 09:46:02 -05001504 }
Brian Osman16adfa32016-10-18 14:42:44 -04001505 }
1506
Mike Klein38af9432016-11-11 11:39:44 -05001507 if (skia_use_lua) {
1508 test_lib("lua") {
1509 public_include_dirs = []
1510 sources = [
1511 "src/utils/SkLua.cpp",
1512 "src/utils/SkLuaCanvas.cpp",
1513 ]
1514 deps = [
1515 "//third_party/lua",
1516 ]
1517 }
1518
Mike Kleine6682eb2017-01-05 10:54:57 -05001519 test_app("lua_app") {
Mike Klein38af9432016-11-11 11:39:44 -05001520 sources = [
1521 "tools/lua/lua_app.cpp",
1522 ]
1523 deps = [
1524 ":lua",
1525 ":skia",
1526 "//third_party/lua",
1527 ]
Mike Klein38af9432016-11-11 11:39:44 -05001528 }
1529
Mike Kleine6682eb2017-01-05 10:54:57 -05001530 test_app("lua_pictures") {
Mike Klein38af9432016-11-11 11:39:44 -05001531 sources = [
1532 "tools/lua/lua_pictures.cpp",
1533 ]
1534 deps = [
1535 ":flags",
1536 ":lua",
1537 ":skia",
1538 ":tool_utils",
1539 "//third_party/lua",
1540 ]
Mike Klein38af9432016-11-11 11:39:44 -05001541 }
1542 }
1543
Cary Clark8032b982017-07-28 11:04:54 -04001544 test_app("bookmaker") {
1545 sources = [
1546 "tools/bookmaker/bookmaker.cpp",
Cary Clarkbef063a2017-10-31 15:44:45 -04001547 "tools/bookmaker/cataloger.cpp",
Cary Clarka560c472017-11-27 10:44:06 -05001548 "tools/bookmaker/definition.cpp",
Cary Clark8032b982017-07-28 11:04:54 -04001549 "tools/bookmaker/fiddleParser.cpp",
1550 "tools/bookmaker/includeParser.cpp",
1551 "tools/bookmaker/includeWriter.cpp",
1552 "tools/bookmaker/mdOut.cpp",
1553 "tools/bookmaker/parserCommon.cpp",
Cary Clarkac47b882018-01-11 10:35:44 -05001554 "tools/bookmaker/selfCheck.cpp",
Cary Clark8032b982017-07-28 11:04:54 -04001555 "tools/bookmaker/spellCheck.cpp",
1556 ]
1557 deps = [
1558 ":flags",
1559 ":skia",
1560 ":tool_utils",
Cary Clark2f466242017-12-11 16:03:17 -05001561 "//third_party/jsoncpp",
Cary Clark8032b982017-07-28 11:04:54 -04001562 ]
1563 }
1564
Kevin Lubickebf648e2017-09-21 13:45:16 -04001565 if (target_cpu != "wasm") {
1566 import("gn/samples.gni")
1567 test_lib("samples") {
1568 public_include_dirs = [ "samplecode" ]
1569 include_dirs = [ "experimental" ]
Yuqian Li56a4a092018-02-12 14:47:34 +08001570 sources = samples_sources
Kevin Lubickebf648e2017-09-21 13:45:16 -04001571 deps = [
Florin Malita4aa44412017-12-19 12:21:02 -05001572 ":experimental_sksg",
Kevin Lubickebf648e2017-09-21 13:45:16 -04001573 ":experimental_svg_model",
1574 ":flags",
1575 ":gm",
Mike Reed193d3a02018-02-08 15:45:51 -05001576 ":skshaper",
Kevin Lubickebf648e2017-09-21 13:45:16 -04001577 ":tool_utils",
1578 ":views",
1579 ":xml",
1580 ]
Mike Klein38af9432016-11-11 11:39:44 -05001581
Kevin Lubickebf648e2017-09-21 13:45:16 -04001582 if (skia_use_lua) {
1583 sources += [ "samplecode/SampleLua.cpp" ]
1584 deps += [
1585 ":lua",
1586 "//third_party/lua",
1587 ]
1588 }
1589 }
1590 test_app("dm") {
1591 sources = [
1592 "dm/DM.cpp",
Hal Canaryb6c5e5b2017-10-09 16:13:02 -04001593 "dm/DMGpuTestProcs.cpp",
Kevin Lubickebf648e2017-09-21 13:45:16 -04001594 "dm/DMJsonWriter.cpp",
1595 "dm/DMSrcSink.cpp",
1596 ]
1597 include_dirs = [ "tests" ]
1598 deps = [
1599 ":common_flags",
Florin Malita54f65c42018-01-16 17:04:30 -05001600 ":experimental_skottie",
Florin Malita4aa44412017-12-19 12:21:02 -05001601 ":experimental_sksg",
Kevin Lubickebf648e2017-09-21 13:45:16 -04001602 ":experimental_svg_model",
1603 ":flags",
1604 ":gm",
1605 ":gpu_tool_utils",
1606 ":skia",
1607 ":tests",
1608 ":tool_utils",
1609 "//third_party/jsoncpp",
1610 "//third_party/libpng",
Mike Klein38af9432016-11-11 11:39:44 -05001611 ]
1612 }
Brian Osman16adfa32016-10-18 14:42:44 -04001613 }
1614
Mike Kleina8a51ce2018-01-09 12:34:11 -05001615 if (!is_win) {
1616 test_app("remote_demo") {
1617 sources = [
1618 "tools/remote_demo.cpp",
1619 ]
1620 deps = [
1621 ":skia",
1622 ]
1623 }
1624 }
1625
Mike Kleine6682eb2017-01-05 10:54:57 -05001626 test_app("nanobench") {
mtklein2b6870c2016-07-28 14:17:33 -07001627 sources = [
1628 "bench/nanobench.cpp",
1629 ]
1630 deps = [
1631 ":bench",
mtklein046cb562016-09-16 10:23:12 -07001632 ":common_flags",
Florin Malita4aa44412017-12-19 12:21:02 -05001633 ":experimental_sksg",
fmalita6519c212016-09-14 08:05:17 -07001634 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -07001635 ":flags",
1636 ":gm",
1637 ":gpu_tool_utils",
1638 ":skia",
1639 ":tool_utils",
1640 "//third_party/jsoncpp",
1641 ]
mtklein2b6870c2016-07-28 14:17:33 -07001642 }
halcanary19a97202016-08-03 15:08:04 -07001643
Ravi Mistry10d36c52017-01-31 09:49:18 -05001644 test_app("skpinfo") {
1645 sources = [
1646 "tools/skpinfo.cpp",
1647 ]
1648 deps = [
1649 ":flags",
1650 ":skia",
1651 ]
1652 }
1653
Jim Van Verth8f5468f2016-10-31 09:52:33 -04001654 if (skia_enable_gpu) {
Mike Kleine6682eb2017-01-05 10:54:57 -05001655 test_app("skpbench") {
Jim Van Verth8f5468f2016-10-31 09:52:33 -04001656 sources = [
1657 "tools/skpbench/skpbench.cpp",
1658 ]
1659 deps = [
1660 ":flags",
1661 ":gpu_tool_utils",
1662 ":skia",
1663 ":tool_utils",
1664 ]
Jim Van Verthb6c5e532016-10-28 10:38:08 -04001665 }
csmartdalton4b5179b2016-09-19 11:03:58 -07001666 }
1667
Hal Canary96c57252018-02-09 11:43:05 -05001668 test_lib("skshaper") {
1669 public_include_dirs = [ "tools/shape" ]
1670 deps = [
1671 ":skia",
1672 ]
1673
Hal Canary8bb40832018-02-08 15:16:28 -05001674 if (target_cpu == "wasm") {
Hal Canary96c57252018-02-09 11:43:05 -05001675 sources = [
1676 "tools/shape/SkShaper_primitive.cpp",
1677 ]
1678 } else {
mtklein6f5df6a2016-08-29 16:01:10 -07001679 sources = [
Ben Wagnera25fbef2017-08-30 13:56:19 -04001680 "tools/shape/SkShaper_harfbuzz.cpp",
mtklein6f5df6a2016-08-29 16:01:10 -07001681 ]
Hal Canary96c57252018-02-09 11:43:05 -05001682 deps += [
mtklein6f5df6a2016-08-29 16:01:10 -07001683 "//third_party/harfbuzz",
Ben Wagnera25fbef2017-08-30 13:56:19 -04001684 "//third_party/icu",
mtklein6f5df6a2016-08-29 16:01:10 -07001685 ]
mtklein6f5df6a2016-08-29 16:01:10 -07001686 }
halcanary19a97202016-08-03 15:08:04 -07001687 }
Mike Kleine6682eb2017-01-05 10:54:57 -05001688 test_app("sktexttopdf") {
halcanary3eee9d92016-09-10 07:01:53 -07001689 sources = [
Ben Wagnera25fbef2017-08-30 13:56:19 -04001690 "tools/shape/using_skia_and_harfbuzz.cpp",
halcanary3eee9d92016-09-10 07:01:53 -07001691 ]
1692 deps = [
1693 ":skia",
Hal Canary96c57252018-02-09 11:43:05 -05001694 ":skshaper",
halcanary3eee9d92016-09-10 07:01:53 -07001695 ]
halcanary3eee9d92016-09-10 07:01:53 -07001696 }
mtklein046cb562016-09-16 10:23:12 -07001697
Matt Sarett9f1c4032017-05-17 10:06:32 -04001698 test_app("create_flutter_test_images") {
1699 sources = [
1700 "tools/create_flutter_test_images.cpp",
1701 ]
1702 deps = [
1703 ":skia",
1704 ":tool_utils",
1705 ]
1706 }
1707
Ben Wagner219f3622017-07-17 15:32:25 -04001708 test_app("create_test_font") {
1709 sources = [
Ben Wagner483c7722018-02-20 17:06:07 -05001710 "tools/fonts/create_test_font.cpp",
Ben Wagner219f3622017-07-17 15:32:25 -04001711 ]
1712 deps = [
1713 ":skia",
1714 ]
1715 assert_no_deps = [
1716 # tool_utils requires the output of this app.
1717 ":tool_utils",
1718 ]
1719 }
1720
Ben Wagner97182cc2018-02-15 10:20:04 -05001721 test_app("create_test_font_color") {
1722 sources = [
1723 "tools/fonts/create_test_font_color.cpp",
1724 ]
1725 deps = [
1726 ":flags",
1727 ":skia",
Florin Malitac659c2c2018-04-05 11:57:21 -04001728 ":tool_utils",
Ben Wagner97182cc2018-02-15 10:20:04 -05001729 ]
1730 }
1731
Mike Kleine6682eb2017-01-05 10:54:57 -05001732 test_app("get_images_from_skps") {
mtklein046cb562016-09-16 10:23:12 -07001733 sources = [
1734 "tools/get_images_from_skps.cpp",
1735 ]
1736 deps = [
1737 ":flags",
1738 ":skia",
1739 "//third_party/jsoncpp",
1740 ]
mtklein046cb562016-09-16 10:23:12 -07001741 }
mtkleinecbc5262016-09-22 11:51:24 -07001742
Mike Kleine6682eb2017-01-05 10:54:57 -05001743 test_app("colorspaceinfo") {
Matt Sarett8740d582016-11-11 13:59:14 -05001744 sources = [
1745 "tools/colorspaceinfo.cpp",
1746 ]
1747 deps = [
1748 ":flags",
1749 ":skia",
1750 ":tool_utils",
1751 ]
Matt Sarett8740d582016-11-11 13:59:14 -05001752 }
1753
Kevin Lubickebf648e2017-09-21 13:45:16 -04001754 if (!is_ios && target_cpu != "wasm") {
Mike Kleine6682eb2017-01-05 10:54:57 -05001755 test_app("skiaserve") {
Mike Klein7d302882016-11-03 14:06:31 -04001756 sources = [
1757 "tools/skiaserve/Request.cpp",
1758 "tools/skiaserve/Response.cpp",
1759 "tools/skiaserve/skiaserve.cpp",
Mike Klein7d302882016-11-03 14:06:31 -04001760 "tools/skiaserve/urlhandlers/BreakHandler.cpp",
1761 "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
1762 "tools/skiaserve/urlhandlers/CmdHandler.cpp",
1763 "tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
1764 "tools/skiaserve/urlhandlers/DataHandler.cpp",
1765 "tools/skiaserve/urlhandlers/DownloadHandler.cpp",
1766 "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
1767 "tools/skiaserve/urlhandlers/ImgHandler.cpp",
1768 "tools/skiaserve/urlhandlers/InfoHandler.cpp",
Brian Salomon144a5c52016-12-20 16:48:59 -05001769 "tools/skiaserve/urlhandlers/OpBoundsHandler.cpp",
1770 "tools/skiaserve/urlhandlers/OpsHandler.cpp",
Mike Klein7d302882016-11-03 14:06:31 -04001771 "tools/skiaserve/urlhandlers/OverdrawHandler.cpp",
1772 "tools/skiaserve/urlhandlers/PostHandler.cpp",
1773 "tools/skiaserve/urlhandlers/QuitHandler.cpp",
1774 "tools/skiaserve/urlhandlers/RootHandler.cpp",
1775 ]
1776 deps = [
1777 ":flags",
1778 ":gpu_tool_utils",
1779 ":skia",
1780 ":tool_utils",
1781 "//third_party/jsoncpp",
1782 "//third_party/libmicrohttpd",
1783 "//third_party/libpng",
1784 ]
Mike Klein7d302882016-11-03 14:06:31 -04001785 }
mtkleinecbc5262016-09-22 11:51:24 -07001786 }
kjlubick14f984b2016-10-03 11:49:45 -07001787
Mike Kleine6682eb2017-01-05 10:54:57 -05001788 test_app("fuzz") {
Kevin Lubick9ff5dc92018-01-09 12:47:33 -05001789 include_dirs = [
1790 "tools",
1791 "tools/debugger",
1792 ]
kjlubick14f984b2016-10-03 11:49:45 -07001793 sources = [
Hal Canary24ac42b2017-02-14 13:35:14 -05001794 "fuzz/FuzzCanvas.cpp",
Cary Clark91390c82018-03-09 14:02:46 -05001795 "fuzz/FuzzCommon.cpp",
Kevin Lubickfec1dea2016-11-22 13:57:18 -05001796 "fuzz/FuzzDrawFunctions.cpp",
Kevin Lubicke4be55d2018-03-30 15:05:13 -04001797 "fuzz/FuzzEncoders.cpp",
kjlubick14f984b2016-10-03 11:49:45 -07001798 "fuzz/FuzzGradients.cpp",
1799 "fuzz/FuzzParsePath.cpp",
Cary Clark91390c82018-03-09 14:02:46 -05001800 "fuzz/FuzzPathMeasure.cpp",
kjlubick14f984b2016-10-03 11:49:45 -07001801 "fuzz/FuzzPathop.cpp",
Hal Canary13872dd2018-04-06 10:25:12 -04001802 "fuzz/FuzzRegionOp.cpp",
kjlubick14f984b2016-10-03 11:49:45 -07001803 "fuzz/fuzz.cpp",
Kevin Lubick2416f962018-02-12 08:26:39 -05001804 "fuzz/oss_fuzz/FuzzAnimatedImage.cpp",
1805 "fuzz/oss_fuzz/FuzzImage.cpp",
Kevin Lubickf034d112018-02-08 14:31:24 -05001806 "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
1807 "fuzz/oss_fuzz/FuzzPathDeserialize.cpp",
Kevin Lubick2541edf2018-01-11 10:27:14 -05001808 "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp",
1809 "fuzz/oss_fuzz/FuzzRegionSetPath.cpp",
Kevin Lubickf034d112018-02-08 14:31:24 -05001810 "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
Kevin Lubick9ff5dc92018-01-09 12:47:33 -05001811 "tools/UrlDataManager.cpp",
1812 "tools/debugger/SkDebugCanvas.cpp",
1813 "tools/debugger/SkDrawCommand.cpp",
1814 "tools/debugger/SkJsonWriteBuffer.cpp",
Kevin Lubick9ff5dc92018-01-09 12:47:33 -05001815 "tools/picture_utils.cpp",
kjlubick14f984b2016-10-03 11:49:45 -07001816 ]
1817 deps = [
1818 ":flags",
Hal Canary44801ca2017-03-15 11:39:06 -04001819 ":gpu_tool_utils",
kjlubick14f984b2016-10-03 11:49:45 -07001820 ":skia",
Kevin Lubick9ff5dc92018-01-09 12:47:33 -05001821 "//third_party/jsoncpp",
1822 "//third_party/libpng",
kjlubick14f984b2016-10-03 11:49:45 -07001823 ]
kjlubick14f984b2016-10-03 11:49:45 -07001824 }
Mike Klein38312422016-10-05 15:41:01 -04001825
Mike Kleine6682eb2017-01-05 10:54:57 -05001826 test_app("pathops_unittest") {
Mike Klein6e744122016-10-27 12:21:40 -04001827 sources = pathops_tests_sources + [
Mike Klein6e55fef2016-10-26 11:41:47 -04001828 rebase_path("tests/skia_test.cpp"),
1829 rebase_path("tests/Test.cpp"),
1830 ]
caryclark9feb6322016-10-25 08:58:26 -07001831 deps = [
1832 ":flags",
1833 ":gpu_tool_utils",
1834 ":skia",
1835 ":tool_utils",
1836 ]
caryclark9feb6322016-10-25 08:58:26 -07001837 }
1838
Mike Kleine6682eb2017-01-05 10:54:57 -05001839 test_app("dump_record") {
Mike Klein38312422016-10-05 15:41:01 -04001840 sources = [
1841 "tools/DumpRecord.cpp",
1842 "tools/dump_record.cpp",
1843 ]
1844 deps = [
1845 ":flags",
1846 ":skia",
1847 ]
Mike Klein38312422016-10-05 15:41:01 -04001848 }
bungemanfe917272016-10-13 17:36:40 -04001849
Mike Kleine6682eb2017-01-05 10:54:57 -05001850 test_app("skdiff") {
bungemanfe917272016-10-13 17:36:40 -04001851 sources = [
1852 "tools/skdiff/skdiff.cpp",
1853 "tools/skdiff/skdiff_html.cpp",
1854 "tools/skdiff/skdiff_main.cpp",
1855 "tools/skdiff/skdiff_utils.cpp",
1856 ]
1857 deps = [
1858 ":skia",
1859 ":tool_utils",
1860 ]
bungemanfe917272016-10-13 17:36:40 -04001861 }
halcanarya73d76a2016-10-17 13:19:02 -07001862
Mike Kleine6682eb2017-01-05 10:54:57 -05001863 test_app("skp_parser") {
halcanarya73d76a2016-10-17 13:19:02 -07001864 sources = [
1865 "tools/skp_parser.cpp",
1866 ]
1867 deps = [
1868 ":skia",
1869 ":tool_utils",
1870 "//third_party/jsoncpp",
1871 ]
halcanarya73d76a2016-10-17 13:19:02 -07001872 }
Brian Osman16adfa32016-10-18 14:42:44 -04001873
Hal Canaryd7b38452017-12-11 17:46:26 -05001874 if (!is_win && skia_enable_gpu) {
1875 test_lib("skqp_lib") {
1876 public_include_dirs = [ "tools/skqp" ]
Hal Canary0e07ad72018-02-08 13:06:56 -05001877 defines =
1878 [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ]
Hal Canary4689b542018-01-31 11:54:14 -05001879 if (skia_skqp_enable_driver_correctness_workarounds) {
1880 defines += [ "SK_SKQP_ENABLE_DRIVER_CORRECTNESS_WORKAROUNDS" ]
1881 }
Hal Canary75427132017-10-11 16:00:31 -04001882 sources = [
1883 "dm/DMGpuTestProcs.cpp",
Hal Canaryd7b38452017-12-11 17:46:26 -05001884 "tools/skqp/gm_knowledge.cpp",
1885 "tools/skqp/gm_runner.cpp",
Hal Canary75427132017-10-11 16:00:31 -04001886 ]
1887 deps = [
1888 ":gm",
1889 ":gpu_tool_utils",
1890 ":skia",
1891 ":tests",
Hal Canaryd7b38452017-12-11 17:46:26 -05001892 ":tool_utils",
1893 ]
1894 }
1895 test_app("skqp") {
1896 sources = [
1897 "tools/skqp/skqp.cpp",
1898 ]
1899 deps = [
1900 ":skia",
1901 ":skqp_lib",
Hal Canary537d9c02018-01-30 11:30:48 -05001902 ":tool_utils",
Hal Canary75427132017-10-11 16:00:31 -04001903 "//third_party/googletest",
1904 ]
1905 }
1906 }
Hal Canary28f89382017-12-12 09:42:14 -05001907 if (is_android && skia_enable_gpu) {
1908 test_app("skqp_app") {
1909 is_shared_library = true
1910 sources = [
1911 "tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp",
1912 ]
1913 deps = [
1914 ":skia",
1915 ":skqp_lib",
Hal Canaryb4d01a92018-01-29 13:10:08 -05001916 ":tool_utils",
Hal Canary28f89382017-12-12 09:42:14 -05001917 ]
1918 libs = [ "android" ]
1919 }
1920 }
Hal Canary75427132017-10-11 16:00:31 -04001921
Hal Canarya9de7602018-01-19 13:08:23 -05001922 test_app("list_gms") {
1923 sources = [
1924 "tools/list_gms.cpp",
1925 ]
1926 deps = [
1927 ":gm",
1928 ":skia",
1929 ]
1930 }
1931 test_app("list_gpu_unit_tests") {
1932 sources = [
1933 "dm/DMGpuTestProcs.cpp",
1934 "tools/list_gpu_unit_tests.cpp",
1935 ]
1936 deps = [
1937 ":skia",
1938 ":tests",
1939 ]
1940 }
1941
Jim Van Verthdbb24ef2017-09-01 11:01:51 -04001942 if (skia_enable_gpu) {
Brian Osmaneff04b52017-11-21 13:18:02 -05001943 test_lib("sk_app") {
1944 public_include_dirs = [ "tools/sk_app" ]
Brian Osman16adfa32016-10-18 14:42:44 -04001945 sources = [
Brian Osmaneff04b52017-11-21 13:18:02 -05001946 "tools/sk_app/CommandSet.cpp",
1947 "tools/sk_app/GLWindowContext.cpp",
1948 "tools/sk_app/Window.cpp",
Brian Osman16adfa32016-10-18 14:42:44 -04001949 ]
Brian Osman2dd96932016-10-18 15:33:53 -04001950 libs = []
Brian Osman16adfa32016-10-18 14:42:44 -04001951
Jim Van Verth4e56a912016-10-21 10:58:52 -04001952 if (is_android) {
1953 sources += [
Brian Osmaneff04b52017-11-21 13:18:02 -05001954 "tools/sk_app/android/GLWindowContext_android.cpp",
1955 "tools/sk_app/android/RasterWindowContext_android.cpp",
1956 "tools/sk_app/android/Window_android.cpp",
1957 "tools/sk_app/android/main_android.cpp",
1958 "tools/sk_app/android/surface_glue_android.cpp",
Jim Van Verth4e56a912016-10-21 10:58:52 -04001959 ]
Brian Osman462334e2017-02-09 11:22:57 -05001960 libs += [ "android" ]
Jim Van Verth4e56a912016-10-21 10:58:52 -04001961 } else if (is_linux) {
Brian Osman2dd96932016-10-18 15:33:53 -04001962 sources += [
Brian Osmaneff04b52017-11-21 13:18:02 -05001963 "tools/sk_app/unix/GLWindowContext_unix.cpp",
1964 "tools/sk_app/unix/RasterWindowContext_unix.cpp",
1965 "tools/sk_app/unix/Window_unix.cpp",
Brian Osmanfa916272017-12-01 09:18:20 -05001966 "tools/sk_app/unix/keysym2ucs.c",
Brian Osmaneff04b52017-11-21 13:18:02 -05001967 "tools/sk_app/unix/main_unix.cpp",
Brian Osman2dd96932016-10-18 15:33:53 -04001968 ]
Brian Osmanfa916272017-12-01 09:18:20 -05001969 libs += [
1970 "GL",
1971 "X11",
1972 ]
Brian Osman2dd96932016-10-18 15:33:53 -04001973 } else if (is_win) {
Brian Osman16adfa32016-10-18 14:42:44 -04001974 sources += [
Brian Osmaneff04b52017-11-21 13:18:02 -05001975 "tools/sk_app/win/GLWindowContext_win.cpp",
1976 "tools/sk_app/win/RasterWindowContext_win.cpp",
1977 "tools/sk_app/win/Window_win.cpp",
1978 "tools/sk_app/win/main_win.cpp",
Brian Osman16adfa32016-10-18 14:42:44 -04001979 ]
Brian Salomon194db172017-08-17 14:37:06 -04001980 if (skia_use_angle) {
Brian Osmaneff04b52017-11-21 13:18:02 -05001981 sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
Brian Salomon194db172017-08-17 14:37:06 -04001982 }
Mike Klein43c25262016-10-20 10:17:47 -04001983 } else if (is_mac) {
1984 sources += [
Brian Osmaneff04b52017-11-21 13:18:02 -05001985 "tools/sk_app/mac/GLWindowContext_mac.cpp",
1986 "tools/sk_app/mac/RasterWindowContext_mac.cpp",
1987 "tools/sk_app/mac/Window_mac.cpp",
1988 "tools/sk_app/mac/main_mac.cpp",
Mike Klein43c25262016-10-20 10:17:47 -04001989 ]
Brian Osmanfa916272017-12-01 09:18:20 -05001990 libs += [
1991 "QuartzCore.framework",
1992 "Cocoa.framework",
1993 "Foundation.framework",
1994 ]
Jim Van Verthdbb24ef2017-09-01 11:01:51 -04001995 } else if (is_ios) {
1996 sources += [
Brian Osmaneff04b52017-11-21 13:18:02 -05001997 "tools/sk_app/ios/GLWindowContext_ios.cpp",
1998 "tools/sk_app/ios/RasterWindowContext_ios.cpp",
1999 "tools/sk_app/ios/Window_ios.cpp",
2000 "tools/sk_app/ios/main_ios.cpp",
Jim Van Verthdbb24ef2017-09-01 11:01:51 -04002001 ]
Brian Osman16adfa32016-10-18 14:42:44 -04002002 }
2003
2004 if (skia_use_vulkan) {
Brian Osmaneff04b52017-11-21 13:18:02 -05002005 sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
Jim Van Verth4e56a912016-10-21 10:58:52 -04002006 if (is_android) {
Brian Osmaneff04b52017-11-21 13:18:02 -05002007 sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ]
Jim Van Verth4e56a912016-10-21 10:58:52 -04002008 } else if (is_linux) {
Brian Osmaneff04b52017-11-21 13:18:02 -05002009 sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ]
Brian Osman2dd96932016-10-18 15:33:53 -04002010 libs += [ "X11-xcb" ]
2011 } else if (is_win) {
Brian Osmaneff04b52017-11-21 13:18:02 -05002012 sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ]
Brian Osman16adfa32016-10-18 14:42:44 -04002013 }
2014 }
2015
Brian Osman16adfa32016-10-18 14:42:44 -04002016 deps = [
Brian Osman16adfa32016-10-18 14:42:44 -04002017 ":gpu_tool_utils",
Brian Osman16adfa32016-10-18 14:42:44 -04002018 ":skia",
2019 ":tool_utils",
2020 ":views",
Brian Osman16adfa32016-10-18 14:42:44 -04002021 ]
Jim Van Verth4e56a912016-10-21 10:58:52 -04002022 if (is_android) {
2023 deps += [ "//third_party/native_app_glue" ]
Jim Van Verthdbb24ef2017-09-01 11:01:51 -04002024 } else if (is_mac || is_ios) {
Mike Klein43c25262016-10-20 10:17:47 -04002025 deps += [ "//third_party/libsdl" ]
2026 }
Brian Salomon194db172017-08-17 14:37:06 -04002027 if (skia_use_angle) {
2028 deps += [ "//third_party/angle2" ]
2029 }
Mike Kleina92c3832016-12-08 09:49:39 -05002030 }
Brian Osman16adfa32016-10-18 14:42:44 -04002031 }
Ethan Nicholas4f3985c2016-11-14 11:16:37 -05002032
Brian Osmaneff04b52017-11-21 13:18:02 -05002033 if (skia_enable_gpu) {
2034 test_app("viewer") {
2035 is_shared_library = is_android
Jim Van Verth329c5a62017-11-29 11:42:33 -05002036 if (is_ios) {
2037 bundle_ios_data = true
2038 }
Brian Osmaneff04b52017-11-21 13:18:02 -05002039 sources = [
Chris Dalton2d18f412018-02-20 13:23:32 -07002040 "tools/viewer/BisectSlide.cpp",
Brian Osmaneff04b52017-11-21 13:18:02 -05002041 "tools/viewer/GMSlide.cpp",
Brian Osmand67e5182017-12-08 16:46:09 -05002042 "tools/viewer/ImGuiLayer.cpp",
Brian Osmaneff04b52017-11-21 13:18:02 -05002043 "tools/viewer/ImageSlide.cpp",
2044 "tools/viewer/SKPSlide.cpp",
2045 "tools/viewer/SampleSlide.cpp",
Florin Malita54f65c42018-01-16 17:04:30 -05002046 "tools/viewer/SkottieSlide.cpp",
Florin Malita76a076b2018-02-15 18:40:48 -05002047 "tools/viewer/SlideDir.cpp",
Brian Osman56a24812017-12-19 11:15:16 -05002048 "tools/viewer/StatsLayer.cpp",
Florin Malitac659c2c2018-04-05 11:57:21 -04002049 "tools/viewer/SvgSlide.cpp",
Brian Osmaneff04b52017-11-21 13:18:02 -05002050 "tools/viewer/Viewer.cpp",
2051 ]
2052 libs = []
2053
2054 include_dirs = []
2055 deps = [
Florin Malita54f65c42018-01-16 17:04:30 -05002056 ":experimental_skottie",
Florin Malitabcd07232018-01-31 11:08:58 -05002057 ":experimental_sksg",
Florin Malitac659c2c2018-04-05 11:57:21 -04002058 ":experimental_svg_model",
Brian Osmaneff04b52017-11-21 13:18:02 -05002059 ":flags",
2060 ":gm",
2061 ":gpu_tool_utils",
2062 ":samples",
2063 ":sk_app",
2064 ":skia",
2065 ":tool_utils",
2066 ":views",
2067 "//third_party/imgui",
2068 "//third_party/jsoncpp",
2069 ]
2070 }
2071 }
2072
2073 if (skia_enable_gpu && !skia_use_angle && (is_linux || is_win || is_mac)) {
2074 test_app("HelloWorld") {
2075 sources = [
2076 "example/HelloWorld.cpp",
2077 ]
2078 libs = []
2079
2080 include_dirs = []
2081 deps = [
2082 ":flags",
2083 ":gpu_tool_utils",
2084 ":sk_app",
2085 ":skia",
2086 ":tool_utils",
2087 ":views",
2088 ]
2089 }
2090 }
2091
Jim Van Verthecfed2b2017-08-30 14:02:50 -04002092 if (skia_enable_gpu && (is_linux || is_mac || is_ios)) {
Jim Van Verth4c70c752017-07-11 12:03:01 -04002093 test_app("SkiaSDLExample") {
2094 sources = [
2095 "example/SkiaSDLExample.cpp",
2096 ]
2097 libs = []
2098 include_dirs = []
2099 deps = [
2100 ":gpu_tool_utils",
2101 ":skia",
2102 "//third_party/libsdl",
2103 ]
2104 }
2105 }
2106
Robert Phillipsa6d2d702017-09-01 12:17:03 -04002107 if (skia_qt_path != "" && (is_win || is_linux || is_mac)) {
2108 action_foreach("generate_mocs") {
2109 script = "gn/call.py"
2110 sources = [
2111 "tools/mdbviz/MainWindow.h",
2112 ]
2113 outputs = [
2114 "$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp",
2115 ]
2116 args = [
2117 "$skia_qt_path" + "/bin/moc",
2118 "{{source}}",
2119 "-o",
2120 "gen/mdbviz/{{source_name_part}}_moc.cpp",
2121 ]
2122 }
2123 action_foreach("generate_resources") {
2124 script = "gn/call.py"
2125 sources = [
2126 "tools/mdbviz/resources.qrc",
2127 ]
2128 outputs = [
2129 "$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp",
2130 ]
2131 args = [
2132 "$skia_qt_path" + "/bin/rcc",
2133 "{{source}}",
2134 "-o",
2135 "gen/mdbviz/{{source_name_part}}_res.cpp",
2136 ]
2137 }
2138 test_app("mdbviz") {
2139 if (is_win) {
2140 # on Windows we need to disable some exception handling warnings due to the Qt headers
2141 cflags = [ "/Wv:18" ] # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017
2142 }
2143 sources = [
Robert Phillips5fccf9d2017-09-05 15:10:12 -04002144 "tools/UrlDataManager.cpp",
2145 "tools/debugger/SkDebugCanvas.cpp",
2146 "tools/debugger/SkDrawCommand.cpp",
2147 "tools/debugger/SkJsonWriteBuffer.cpp",
Robert Phillipsa6d2d702017-09-01 12:17:03 -04002148 "tools/mdbviz/MainWindow.cpp",
Robert Phillipsdeaf5682017-09-06 13:07:21 -04002149 "tools/mdbviz/Model.cpp",
Robert Phillipsa6d2d702017-09-01 12:17:03 -04002150 "tools/mdbviz/main.cpp",
Robert Phillips5fccf9d2017-09-05 15:10:12 -04002151 "tools/picture_utils.cpp",
Robert Phillipsa6d2d702017-09-01 12:17:03 -04002152
2153 # generated files
2154 "$target_gen_dir/mdbviz/MainWindow_moc.cpp",
2155 "$target_gen_dir/mdbviz/resources_res.cpp",
2156 ]
2157 lib_dirs = [ "$skia_qt_path/lib" ]
2158 libs = [
2159 "Qt5Core.lib",
2160 "Qt5Gui.lib",
2161 "Qt5Widgets.lib",
2162 ]
2163 include_dirs = [
2164 "$skia_qt_path/include",
Robert Phillips276066b2017-09-06 17:17:44 -04002165 "$skia_qt_path/include/QtCore",
Robert Phillipsa6d2d702017-09-01 12:17:03 -04002166 "$skia_qt_path/include/QtWidgets",
Robert Phillips5fccf9d2017-09-05 15:10:12 -04002167 "tools",
2168 "tools/debugger",
Robert Phillipsa6d2d702017-09-01 12:17:03 -04002169 ]
2170 deps = [
2171 ":generate_mocs",
2172 ":generate_resources",
2173 ":skia",
Robert Phillips5fccf9d2017-09-05 15:10:12 -04002174 "//third_party/jsoncpp",
2175 "//third_party/libpng",
Robert Phillipsa6d2d702017-09-01 12:17:03 -04002176 ]
2177 }
2178 }
2179
Mike Kleine459afd2017-03-03 09:21:30 -05002180 if (is_android && defined(ndk) && ndk != "") {
Derek Sollenberger70120c72017-01-05 11:39:04 -05002181 copy("gdbserver") {
2182 sources = [
2183 "$ndk/$ndk_gdbserver",
2184 ]
2185 outputs = [
2186 "$root_out_dir/gdbserver",
2187 ]
2188 }
Derek Sollenberger70120c72017-01-05 11:39:04 -05002189 }
mtklein25c81d42016-07-27 13:55:26 -07002190}