blob: 770d3f223d85732c50c5e9ac91e21c221534ce04 [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
mikejurka8c24f4f2016-09-12 16:51:58 -07006import("gn/shared_sources.gni")
brettwb9447282016-09-01 14:24:39 -07007
mtklein3e8012e2016-09-21 09:14:19 -07008if (!defined(is_skia_standalone)) {
9 is_skia_standalone = false
10}
11
mtkleinc04ff472016-06-23 10:29:30 -070012declare_args() {
mtkleind68f9b02016-09-23 13:18:41 -070013 skia_use_angle = false
mtklein63213812016-08-24 09:55:56 -070014 skia_use_expat = true
mtklein3cc22182016-08-29 13:26:14 -070015 skia_use_fontconfig = is_linux
mtkleincdedd0e2016-09-12 15:15:44 -070016 skia_use_freetype = is_android || is_fuchsia || is_linux
mtklein457b42a2016-08-23 13:56:37 -070017 skia_use_giflib = !is_fuchsia
mtklein63213812016-08-24 09:55:56 -070018 skia_use_libjpeg_turbo = true
19 skia_use_libpng = true
mtkleineb3c4252016-08-23 07:38:09 -070020 skia_use_libwebp = !is_fuchsia
mtkleina627b5c2016-09-20 13:36:47 -070021 skia_use_mesa = false
Mike Kleinae7e6712016-10-11 17:49:33 -040022 skia_use_sfntly = !is_fuchsia && !is_win # TODO: icu on Windows, re-enable this.
mtkleinf29180e2016-09-16 07:01:17 -070023 skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24
mtklein63213812016-08-24 09:55:56 -070024 skia_use_zlib = true
mtklein1bd72ba2016-09-16 07:45:52 -070025
26 skia_enable_android_framework_defines = false
mtklein06c35c02016-09-20 12:28:12 -070027 skia_enable_gpu = true
mtklein3e8012e2016-09-21 09:14:19 -070028 skia_enable_tools = is_skia_standalone
29 skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug
Brian Salomon789e25e2016-09-30 13:41:03 -040030 skia_vulkan_sdk = ""
mtkleinc04ff472016-06-23 10:29:30 -070031}
32
Brian Salomon789e25e2016-09-30 13:41:03 -040033skia_use_vulkan = skia_use_vulkan || skia_vulkan_sdk != ""
34
mtklein38925aa2016-09-21 10:11:25 -070035# Our tools require static linking (they use non-exported symbols).
36skia_enable_tools = skia_enable_tools && !is_component_build
mtklein06c35c02016-09-20 12:28:12 -070037
mtkleina45be612016-08-29 15:22:10 -070038fontmgr_android_enabled = skia_use_expat && skia_use_freetype
39
mtklein1211e0c2016-07-26 13:55:45 -070040skia_public_includes = [
mtklein25c81d42016-07-27 13:55:26 -070041 "include/android",
mtkleinfa84d942016-07-28 09:45:14 -070042 "include/c",
mtklein1211e0c2016-07-26 13:55:45 -070043 "include/codec",
44 "include/config",
45 "include/core",
46 "include/effects",
47 "include/gpu",
48 "include/gpu/gl",
49 "include/images",
50 "include/pathops",
51 "include/ports",
mtklein25c81d42016-07-27 13:55:26 -070052 "include/svg",
mtklein1211e0c2016-07-26 13:55:45 -070053 "include/utils",
54 "include/utils/mac",
mtklein25c81d42016-07-27 13:55:26 -070055 "include/xml",
mtklein1211e0c2016-07-26 13:55:45 -070056]
57
mtkleinc04ff472016-06-23 10:29:30 -070058# Skia public API, generally provided by :skia.
59config("skia_public") {
mtklein1211e0c2016-07-26 13:55:45 -070060 include_dirs = skia_public_includes
Mike Kleinae7e6712016-10-11 17:49:33 -040061 defines = []
62 if (is_component_build) {
63 defines += [ "SKIA_DLL" ]
64 }
Mike Kleinc4cbd742016-09-26 21:37:09 -040065 if (is_fuchsia || is_linux) {
jcgregorio5561e3d2016-08-25 09:25:11 -070066 defines += [ "SK_SAMPLES_FOR_X" ]
67 }
mtkleincae1be52016-09-20 08:24:34 -070068 if (skia_enable_android_framework_defines) {
69 defines += skia_android_framework_defines
70 }
mtklein06c35c02016-09-20 12:28:12 -070071 if (!skia_enable_gpu) {
72 defines += [ "SK_SUPPORT_GPU=0" ]
73 }
mtkleinc04ff472016-06-23 10:29:30 -070074}
75
76# Skia internal APIs, used by Skia itself and a few test tools.
77config("skia_private") {
78 visibility = [ ":*" ]
79
80 include_dirs = [
81 "include/private",
82 "src/c",
mtklein1211e0c2016-07-26 13:55:45 -070083 "src/codec",
mtkleinc04ff472016-06-23 10:29:30 -070084 "src/config",
85 "src/core",
86 "src/effects",
mtklein25c81d42016-07-27 13:55:26 -070087 "src/effects/gradients",
88 "src/fonts",
mtkleinc04ff472016-06-23 10:29:30 -070089 "src/gpu",
90 "src/image",
91 "src/images",
92 "src/lazy",
93 "src/opts",
94 "src/pathops",
mtklein2b6870c2016-07-28 14:17:33 -070095 "src/pdf",
mtkleinc04ff472016-06-23 10:29:30 -070096 "src/ports",
97 "src/sfnt",
mtklein9e0d9dd2016-08-30 10:37:19 -070098 "src/sksl",
mtkleinc04ff472016-06-23 10:29:30 -070099 "src/utils",
mtklein7a1f45f2016-08-04 06:19:33 -0700100 "src/utils/win",
mtkleinc04ff472016-06-23 10:29:30 -0700101 "third_party/etc1",
102 "third_party/ktx",
103 ]
mtklein150d1132016-08-01 06:56:40 -0700104
mtklein63213812016-08-24 09:55:56 -0700105 defines = [ "SK_GAMMA_APPLY_TO_A8" ]
mtkleinb37c0342016-09-09 11:07:45 -0700106 if (is_android) {
107 defines += [
108 "SK_GAMMA_EXPONENT=1.4",
109 "SK_GAMMA_CONTRAST=0.0",
110 ]
111 }
mtklein88a7ac02016-09-14 11:16:49 -0700112 if (is_official_build || is_android) {
113 # TODO(bsalomon): it'd be nice to make Android normal.
114 defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
115 }
Brian Salomon789e25e2016-09-30 13:41:03 -0400116 libs = []
117 lib_dirs = []
118 if (skia_use_vulkan) {
119 if (skia_vulkan_sdk != "") {
120 include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ]
121 lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ]
122 }
123 libs += [ "vulkan" ]
124 }
mtkleinc04ff472016-06-23 10:29:30 -0700125}
126
127# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
128config("skia_library") {
129 visibility = [ ":*" ]
mtkleinc04ff472016-06-23 10:29:30 -0700130 defines = [ "SKIA_IMPLEMENTATION=1" ]
131}
132
133skia_library_configs = [
134 ":skia_public",
135 ":skia_private",
136 ":skia_library",
137]
138
mtklein9b8583d2016-08-24 17:32:30 -0700139# Use for CPU-specific Skia code that needs particular compiler flags.
140template("opts") {
141 if (invoker.enabled) {
142 source_set(target_name) {
143 forward_variables_from(invoker, "*")
144 configs += skia_library_configs
145 }
146 } else {
147 # If not enabled, a phony empty target that swallows all otherwise unused variables.
148 source_set(target_name) {
149 forward_variables_from(invoker,
150 "*",
151 [
152 "sources",
153 "cflags",
154 ])
155 }
156 }
anmittala7eaf2e2016-08-17 13:57:26 -0700157}
158
mtklein422310d2016-08-16 18:28:43 -0700159is_x86 = current_cpu == "x64" || current_cpu == "x86"
mtkleinc04ff472016-06-23 10:29:30 -0700160
mtklein7d6fb2c2016-08-25 14:50:44 -0700161opts("none") {
162 enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
brettwb9447282016-09-01 14:24:39 -0700163 sources = skia_opts.none_sources
anmittalb8b3f712016-08-25 04:55:19 -0700164 cflags = []
165}
166
mtklein7d6fb2c2016-08-25 14:50:44 -0700167opts("armv7") {
anmittalb8b3f712016-08-25 04:55:19 -0700168 enabled = current_cpu == "arm"
brettwb9447282016-09-01 14:24:39 -0700169 sources = skia_opts.armv7_sources + skia_opts.neon_sources
mtklein7d6fb2c2016-08-25 14:50:44 -0700170 cflags = []
anmittalb8b3f712016-08-25 04:55:19 -0700171}
172
173opts("arm64") {
174 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700175 sources = skia_opts.arm64_sources
anmittalb8b3f712016-08-25 04:55:19 -0700176 cflags = []
177}
178
179opts("crc32") {
180 enabled = current_cpu == "arm64"
brettwb9447282016-09-01 14:24:39 -0700181 sources = skia_opts.crc32_sources
anmittalb8b3f712016-08-25 04:55:19 -0700182 cflags = [ "-march=armv8-a+crc" ]
183}
184
mtklein9b8583d2016-08-24 17:32:30 -0700185opts("sse2") {
186 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700187 sources = skia_opts.sse2_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400188 if (!is_win) {
189 cflags = [ "-msse2" ]
190 }
mtklein9b8583d2016-08-24 17:32:30 -0700191}
mtkleinc04ff472016-06-23 10:29:30 -0700192
mtklein9b8583d2016-08-24 17:32:30 -0700193opts("ssse3") {
194 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700195 sources = skia_opts.ssse3_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400196 if (!is_win) {
197 cflags = [ "-mssse3" ]
198 }
mtklein9b8583d2016-08-24 17:32:30 -0700199}
mtkleinc04ff472016-06-23 10:29:30 -0700200
mtklein9b8583d2016-08-24 17:32:30 -0700201opts("sse41") {
202 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700203 sources = skia_opts.sse41_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400204 if (!is_win) {
205 cflags = [ "-msse4.1" ]
206 }
mtklein9b8583d2016-08-24 17:32:30 -0700207}
mtklein4e976072016-08-08 09:06:27 -0700208
mtklein9b8583d2016-08-24 17:32:30 -0700209opts("sse42") {
210 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700211 sources = skia_opts.sse42_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400212 if (!is_win) {
213 cflags = [ "-msse4.2" ]
214 }
mtklein9b8583d2016-08-24 17:32:30 -0700215}
216
217opts("avx") {
218 enabled = is_x86
brettwb9447282016-09-01 14:24:39 -0700219 sources = skia_opts.avx_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400220 if (is_win) {
221 cflags = [ "/arch:AVX" ]
222 } else {
223 cflags = [ "-mavx" ]
224 }
mtkleinc04ff472016-06-23 10:29:30 -0700225}
226
Mike Klein78d5a3b2016-09-30 10:48:01 -0400227opts("hsw") {
228 enabled = is_x86
229 sources = skia_opts.hsw_sources
Mike Klein3eb71212016-10-11 17:08:53 -0400230 if (is_win) {
231 cflags = [ "/arch:AVX2" ]
232 } else {
233 cflags = [
234 "-mavx2",
235 "-mbmi",
236 "-mbmi2",
237 "-mf16c",
238 "-mfma",
239 ]
240 }
Mike Klein78d5a3b2016-09-30 10:48:01 -0400241}
242
mtklein349cece2016-08-26 08:13:04 -0700243opts("dsp") {
244 enabled = current_cpu == "mipsel"
brettwb9447282016-09-01 14:24:39 -0700245 sources = skia_opts.mips_dsp_sources
mtkleinb6064ef2016-08-30 11:49:24 -0700246 cflags = []
mtklein349cece2016-08-26 08:13:04 -0700247}
248
mtkleinc095df52016-08-24 12:23:52 -0700249# Any feature of Skia that requires third-party code should be optional and use this template.
mtklein457b42a2016-08-23 13:56:37 -0700250template("optional") {
251 if (invoker.enabled) {
252 config(target_name + "_public") {
mtkleincd01b032016-08-31 04:58:19 -0700253 if (defined(invoker.public_defines)) {
254 defines = invoker.public_defines
255 }
mtklein457b42a2016-08-23 13:56:37 -0700256 }
257 source_set(target_name) {
mtkleincd01b032016-08-31 04:58:19 -0700258 forward_variables_from(invoker,
259 "*",
260 [
261 "public_defines",
262 "sources_when_disabled",
263 ])
mtklein457b42a2016-08-23 13:56:37 -0700264 all_dependent_configs = [ ":" + target_name + "_public" ]
mtklein9b8583d2016-08-24 17:32:30 -0700265 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700266 }
267 } else {
mtklein457b42a2016-08-23 13:56:37 -0700268 source_set(target_name) {
269 forward_variables_from(invoker,
270 "*",
271 [
272 "public_defines",
mtklein457b42a2016-08-23 13:56:37 -0700273 "deps",
mtklein6ef69992016-09-14 06:12:09 -0700274 "libs",
mtklein457b42a2016-08-23 13:56:37 -0700275 "sources",
mtkleincd01b032016-08-31 04:58:19 -0700276 "sources_when_disabled",
mtklein457b42a2016-08-23 13:56:37 -0700277 ])
mtkleincd01b032016-08-31 04:58:19 -0700278 if (defined(invoker.sources_when_disabled)) {
279 sources = invoker.sources_when_disabled
280 }
281 configs += skia_library_configs
mtklein457b42a2016-08-23 13:56:37 -0700282 }
mtkleineb3c4252016-08-23 07:38:09 -0700283 }
mtklein457b42a2016-08-23 13:56:37 -0700284}
mtklein457b42a2016-08-23 13:56:37 -0700285
mtkleina45be612016-08-29 15:22:10 -0700286optional("fontmgr_android") {
287 enabled = fontmgr_android_enabled
mtkleina45be612016-08-29 15:22:10 -0700288
289 deps = [
290 "//third_party/expat",
291 "//third_party/freetype2",
292 ]
293 sources = [
294 "src/ports/SkFontMgr_android.cpp",
295 "src/ports/SkFontMgr_android_factory.cpp",
296 "src/ports/SkFontMgr_android_parser.cpp",
297 ]
298}
299
mtkleind2e39db2016-09-07 07:52:55 -0700300optional("fontmgr_custom") {
301 enabled = is_linux && skia_use_freetype && !skia_use_fontconfig
302
303 deps = [
304 "//third_party/freetype2",
305 ]
306 sources = [
307 "src/ports/SkFontMgr_custom.cpp",
308 "src/ports/SkFontMgr_custom_directory_factory.cpp",
309 ]
310}
311
mtklein3cc22182016-08-29 13:26:14 -0700312optional("fontmgr_fontconfig") {
313 enabled = skia_use_freetype && skia_use_fontconfig
mtklein3cc22182016-08-29 13:26:14 -0700314
315 deps = [
316 "//third_party:fontconfig",
317 "//third_party/freetype2",
318 ]
319 sources = [
bungeman1ae0e012016-09-19 12:13:16 -0700320 "src/ports/SkFontConfigInterface.cpp",
mtklein3cc22182016-08-29 13:26:14 -0700321 "src/ports/SkFontConfigInterface_direct.cpp",
322 "src/ports/SkFontConfigInterface_direct_factory.cpp",
323 "src/ports/SkFontMgr_FontConfigInterface.cpp",
324 "src/ports/SkFontMgr_fontconfig.cpp",
325 "src/ports/SkFontMgr_fontconfig_factory.cpp",
326 ]
327}
328
mtkleincdedd0e2016-09-12 15:15:44 -0700329optional("fontmgr_fuchsia") {
330 enabled = is_fuchsia && skia_use_freetype
331
332 deps = [
333 "//third_party/freetype2",
334 ]
335 sources = [
336 "src/ports/SkFontMgr_custom.cpp",
337 "src/ports/SkFontMgr_custom_empty_factory.cpp",
338 ]
339}
340
mtklein457b42a2016-08-23 13:56:37 -0700341optional("gif") {
342 enabled = skia_use_giflib
343 public_defines = [ "SK_HAS_GIF_LIBRARY" ]
344
mtklein457b42a2016-08-23 13:56:37 -0700345 deps = [
346 "//third_party/giflib",
347 ]
348 sources = [
349 "src/codec/SkGifCodec.cpp",
350 ]
351}
352
mtklein06c35c02016-09-20 12:28:12 -0700353optional("gpu") {
354 enabled = skia_enable_gpu
mtkleine9fb3d52016-09-20 15:11:46 -0700355 public_defines = []
356
mtklein06c35c02016-09-20 12:28:12 -0700357 sources = skia_gpu_sources + [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ]
358
359 # These paths need to be absolute to match the ones produced by shared_sources.gni.
360 sources -= get_path_info([
361 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
362 "src/gpu/gl/GrGLDefaultInterface_none.cpp",
363 ],
364 "abspath")
365 if (is_android) {
366 sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ]
367 } else if (is_linux) {
368 sources += [ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp" ]
369 } else if (is_mac) {
370 sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ]
371 } else {
372 sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ]
373 }
mtkleine9fb3d52016-09-20 15:11:46 -0700374 libs = []
375
376 if (skia_use_vulkan) {
377 public_defines += [ "SK_VULKAN" ]
378 sources += skia_vk_sources
egdaniele4a9bd72016-09-21 07:36:14 -0700379 if (skia_enable_vulkan_debug_layers) {
380 public_defines += [ "SK_ENABLE_VK_LAYERS" ]
381 }
mtkleine9fb3d52016-09-20 15:11:46 -0700382 }
mtklein06c35c02016-09-20 12:28:12 -0700383}
384
mtklein63213812016-08-24 09:55:56 -0700385optional("jpeg") {
386 enabled = skia_use_libjpeg_turbo
387 public_defines = [ "SK_HAS_JPEG_LIBRARY" ]
388
mtklein63213812016-08-24 09:55:56 -0700389 deps = [
390 "//third_party/libjpeg-turbo:libjpeg",
391 ]
392 sources = [
393 "src/codec/SkJpegCodec.cpp",
394 "src/codec/SkJpegDecoderMgr.cpp",
395 "src/codec/SkJpegUtility.cpp",
396 "src/images/SkJPEGImageEncoder.cpp",
397 "src/images/SkJPEGWriteUtility.cpp",
398 ]
399}
400
401optional("pdf") {
402 enabled = skia_use_zlib
mtklein63213812016-08-24 09:55:56 -0700403
mtklein63213812016-08-24 09:55:56 -0700404 deps = [
405 "//third_party/zlib",
406 ]
brettwb9447282016-09-01 14:24:39 -0700407 sources = skia_pdf_sources
mtkleincd01b032016-08-31 04:58:19 -0700408 sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
mtklein63213812016-08-24 09:55:56 -0700409
410 if (skia_use_sfntly) {
411 deps += [ "//third_party/sfntly" ]
mtkleincd01b032016-08-31 04:58:19 -0700412 public_defines = [ "SK_PDF_USE_SFNTLY" ]
mtklein63213812016-08-24 09:55:56 -0700413 }
414}
415
416optional("png") {
417 enabled = skia_use_libpng
418 public_defines = [ "SK_HAS_PNG_LIBRARY" ]
419
mtklein63213812016-08-24 09:55:56 -0700420 deps = [
421 "//third_party/libpng",
422 ]
423 sources = [
424 "src/codec/SkIcoCodec.cpp",
425 "src/codec/SkPngCodec.cpp",
426 "src/images/SkPNGImageEncoder.cpp",
427 ]
428}
429
mtklein3cc22182016-08-29 13:26:14 -0700430optional("typeface_freetype") {
431 enabled = skia_use_freetype
mtklein3cc22182016-08-29 13:26:14 -0700432
433 deps = [
434 "//third_party/freetype2",
435 ]
436 sources = [
437 "src/ports/SkFontHost_FreeType.cpp",
438 "src/ports/SkFontHost_FreeType_common.cpp",
439 ]
440}
441
mtklein457b42a2016-08-23 13:56:37 -0700442optional("webp") {
443 enabled = skia_use_libwebp
444 public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
445
mtklein457b42a2016-08-23 13:56:37 -0700446 deps = [
447 "//third_party/libwebp",
448 ]
449 sources = [
450 "src/codec/SkWebpAdapterCodec.cpp",
451 "src/codec/SkWebpCodec.cpp",
452 "src/images/SkWEBPImageEncoder.cpp",
453 ]
mtkleineb3c4252016-08-23 07:38:09 -0700454}
455
mtklein63213812016-08-24 09:55:56 -0700456optional("xml") {
457 enabled = skia_use_expat
mtklein63213812016-08-24 09:55:56 -0700458
mtklein63213812016-08-24 09:55:56 -0700459 deps = [
460 "//third_party/expat",
461 ]
462 sources = [
463 "src/xml/SkDOM.cpp",
464 "src/xml/SkXMLParser.cpp",
465 "src/xml/SkXMLWriter.cpp",
466 ]
467}
468
mtkleinc04ff472016-06-23 10:29:30 -0700469component("skia") {
470 public_configs = [ ":skia_public" ]
471 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700472
473 deps = [
anmittalb8b3f712016-08-25 04:55:19 -0700474 ":arm64",
475 ":armv7",
mtklein9b8583d2016-08-24 17:32:30 -0700476 ":avx",
anmittalb8b3f712016-08-25 04:55:19 -0700477 ":crc32",
mtklein349cece2016-08-26 08:13:04 -0700478 ":dsp",
mtkleina45be612016-08-29 15:22:10 -0700479 ":fontmgr_android",
mtkleind2e39db2016-09-07 07:52:55 -0700480 ":fontmgr_custom",
mtklein3cc22182016-08-29 13:26:14 -0700481 ":fontmgr_fontconfig",
mtkleincdedd0e2016-09-12 15:15:44 -0700482 ":fontmgr_fuchsia",
mtklein457b42a2016-08-23 13:56:37 -0700483 ":gif",
mtklein06c35c02016-09-20 12:28:12 -0700484 ":gpu",
Mike Klein78d5a3b2016-09-30 10:48:01 -0400485 ":hsw",
mtklein63213812016-08-24 09:55:56 -0700486 ":jpeg",
mtklein9b8583d2016-08-24 17:32:30 -0700487 ":none",
mtklein63213812016-08-24 09:55:56 -0700488 ":pdf",
489 ":png",
mtklein9b8583d2016-08-24 17:32:30 -0700490 ":sse2",
491 ":sse41",
492 ":sse42",
493 ":ssse3",
mtklein3cc22182016-08-29 13:26:14 -0700494 ":typeface_freetype",
mtkleineb3c4252016-08-23 07:38:09 -0700495 ":webp",
mtklein63213812016-08-24 09:55:56 -0700496 ":xml",
mtkleinc04ff472016-06-23 10:29:30 -0700497 ]
498
mtkleinc04ff472016-06-23 10:29:30 -0700499 sources = []
brettwb9447282016-09-01 14:24:39 -0700500 sources += skia_core_sources
501 sources += skia_effects_sources
brettwb9447282016-09-01 14:24:39 -0700502 sources += skia_sksl_sources
503 sources += skia_utils_sources
mtkleinc04ff472016-06-23 10:29:30 -0700504 sources += [
mtklein25c81d42016-07-27 13:55:26 -0700505 "src/android/SkBitmapRegionCodec.cpp",
506 "src/android/SkBitmapRegionDecoder.cpp",
507 "src/codec/SkAndroidCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700508 "src/codec/SkBmpCodec.cpp",
509 "src/codec/SkBmpMaskCodec.cpp",
510 "src/codec/SkBmpRLECodec.cpp",
511 "src/codec/SkBmpStandardCodec.cpp",
512 "src/codec/SkCodec.cpp",
513 "src/codec/SkCodecImageGenerator.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700514 "src/codec/SkMaskSwizzler.cpp",
515 "src/codec/SkMasks.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700516 "src/codec/SkSampledCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700517 "src/codec/SkSampler.cpp",
518 "src/codec/SkSwizzler.cpp",
519 "src/codec/SkWbmpCodec.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700520 "src/images/SkImageEncoder.cpp",
521 "src/images/SkImageEncoder_Factory.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700522 "src/images/SkKTXImageEncoder.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700523 "src/ports/SkDiscardableMemory_none.cpp",
524 "src/ports/SkGlobalInitialization_default.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700525 "src/ports/SkImageGenerator_skia.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700526 "src/ports/SkMemory_malloc.cpp",
527 "src/ports/SkOSFile_stdio.cpp",
528 "src/sfnt/SkOTTable_name.cpp",
529 "src/sfnt/SkOTUtils.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700530 "src/svg/SkSVGCanvas.cpp",
531 "src/svg/SkSVGDevice.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700532 "src/utils/mac/SkStream_mac.cpp",
533 "third_party/etc1/etc1.cpp",
534 "third_party/ktx/ktx.cpp",
535 ]
brettwb9447282016-09-01 14:24:39 -0700536
mtklein7d6fb2c2016-08-25 14:50:44 -0700537 libs = []
538
mtkleinc04ff472016-06-23 10:29:30 -0700539 if (is_win) {
540 sources += [
Mike Kleinae7e6712016-10-11 17:49:33 -0400541 "src/fonts/SkFontMgr_indirect.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700542 "src/ports/SkDebug_win.cpp",
543 "src/ports/SkFontHost_win.cpp",
544 "src/ports/SkFontMgr_win_dw.cpp",
545 "src/ports/SkFontMgr_win_dw_factory.cpp",
546 "src/ports/SkImageEncoder_WIC.cpp",
547 "src/ports/SkImageGeneratorWIC.cpp",
548 "src/ports/SkOSFile_win.cpp",
mtklein605d9522016-09-21 14:01:32 -0700549 "src/ports/SkOSLibrary_win.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700550 "src/ports/SkScalerContext_win_dw.cpp",
551 "src/ports/SkTLS_win.cpp",
552 "src/ports/SkTypeface_win_dw.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700553 "src/xps/SkDocument_XPS.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700554 ]
mtkleinb9be9792016-09-16 14:44:18 -0700555 sources -=
556 [ get_path_info("src/utils/SkThreadUtils_pthread.cpp", "abspath") ]
Mike Kleinae7e6712016-10-11 17:49:33 -0400557 libs += [ "User32.lib" ] # For SkFontMgr_win_dw.cpp.
mtkleinc04ff472016-06-23 10:29:30 -0700558 } else {
559 sources += [
mtkleinc04ff472016-06-23 10:29:30 -0700560 "src/ports/SkOSFile_posix.cpp",
mtklein605d9522016-09-21 14:01:32 -0700561 "src/ports/SkOSLibrary_posix.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700562 "src/ports/SkTLS_pthread.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700563 "src/xps/SkDocument_XPS_None.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700564 ]
565 }
566
mtklein7d6fb2c2016-08-25 14:50:44 -0700567 if (is_android) {
568 deps += [
569 "//third_party/cpu-features",
570 "//third_party/expat",
mtklein7d6fb2c2016-08-25 14:50:44 -0700571 ]
mtklein06c35c02016-09-20 12:28:12 -0700572 sources += [ "src/ports/SkDebug_android.cpp" ]
mtklein7d6fb2c2016-08-25 14:50:44 -0700573 libs += [
574 "EGL",
575 "GLESv2",
576 "log",
577 ]
578 }
579
mtkleinc04ff472016-06-23 10:29:30 -0700580 if (is_linux) {
mtklein09e61f72016-08-23 13:35:28 -0700581 libs += [
582 "GL",
583 "GLU",
584 "X11",
585 ]
mtklein06c35c02016-09-20 12:28:12 -0700586 sources += [ "src/ports/SkDebug_stdio.cpp" ]
mtkleinc04ff472016-06-23 10:29:30 -0700587 }
588
589 if (is_mac) {
590 sources += [
mtklein7d6fb2c2016-08-25 14:50:44 -0700591 "src/ports/SkDebug_stdio.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700592 "src/ports/SkFontHost_mac.cpp",
593 "src/ports/SkImageEncoder_CG.cpp",
594 "src/ports/SkImageGeneratorCG.cpp",
595 ]
mtklein09e61f72016-08-23 13:35:28 -0700596 libs += [
597 "ApplicationServices.framework",
598 "OpenGL.framework",
599 ]
mtkleinc04ff472016-06-23 10:29:30 -0700600 }
abarth6fc8ff02016-07-15 15:15:15 -0700601
602 if (is_fuchsia) {
mtklein06c35c02016-09-20 12:28:12 -0700603 sources += [ "src/ports/SkDebug_stdio.cpp" ]
abarth6fc8ff02016-07-15 15:15:15 -0700604 }
mtkleinc04ff472016-06-23 10:29:30 -0700605}
606
mtkleinada5a442016-08-02 14:28:26 -0700607skia_h_headers = exec_script("gyp/find.py",
608 [ "*.h" ] + rebase_path(skia_public_includes),
609 "list lines",
610 []) -
611 [
612 rebase_path("include/gpu/gl/GrGLConfig_chrome.h"),
613 rebase_path("include/gpu/vk/GrVkBackendContext.h"),
614 rebase_path("include/gpu/vk/GrVkDefines.h"),
615 rebase_path("include/gpu/vk/GrVkInterface.h"),
616 rebase_path("include/gpu/vk/GrVkTypes.h"),
617 rebase_path("include/ports/SkFontMgr_fontconfig.h"),
618 ]
619
mtklein1211e0c2016-07-26 13:55:45 -0700620action("skia.h") {
621 script = "gn/echo_headers.py"
622 args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] +
mtkleinc095df52016-08-24 12:23:52 -0700623 rebase_path(skia_h_headers, target_gen_dir)
Ben Wagnerbc344042016-09-29 15:41:53 -0400624 inputs = skia_h_headers
mtklein1211e0c2016-07-26 13:55:45 -0700625 outputs = [
626 "$target_gen_dir/skia.h",
627 ]
628}
629
mtklein06c35c02016-09-20 12:28:12 -0700630if (skia_enable_gpu && target_cpu == "x64") {
mtklein1fbdf982016-09-15 12:07:48 -0700631 # Our bots only have 64-bit libOSMesa installed.
632 # TODO: worth fixing?
633 executable("fiddle") {
634 include_dirs = [ "$target_gen_dir" ]
635 libs = []
636 if (is_linux) {
637 libs += [ "OSMesa" ]
638 }
mtklein56d56692016-09-15 11:18:55 -0700639
mtklein1fbdf982016-09-15 12:07:48 -0700640 sources = [
641 "src/images/SkForceLinking.cpp",
642 "tools/fiddle/draw.cpp",
643 "tools/fiddle/fiddle_main.cpp",
644 ]
645 deps = [
646 ":skia",
647 ":skia.h",
648 ]
649 }
mtkleinc04ff472016-06-23 10:29:30 -0700650}
mtklein25c81d42016-07-27 13:55:26 -0700651
mtkleinc095df52016-08-24 12:23:52 -0700652# Targets guarded by skia_enable_tools may use //third_party freely.
653if (skia_enable_tools) {
654 template("test_lib") {
655 config(target_name + "_config") {
656 include_dirs = invoker.public_include_dirs
mtkleina627b5c2016-09-20 13:36:47 -0700657 if (defined(invoker.public_defines)) {
658 defines = invoker.public_defines
659 }
mtklein25c81d42016-07-27 13:55:26 -0700660 }
mtkleinc095df52016-08-24 12:23:52 -0700661 source_set(target_name) {
662 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
663 public_configs = [
664 ":" + target_name + "_config",
665 ":skia_private",
666 ]
667
668 if (!defined(deps)) {
669 deps = []
670 }
671 deps += [ ":skia" ]
672 testonly = true
673 }
mtklein25c81d42016-07-27 13:55:26 -0700674 }
mtklein25c81d42016-07-27 13:55:26 -0700675
mtkleinc095df52016-08-24 12:23:52 -0700676 test_lib("gpu_tool_utils") {
mtklein38925aa2016-09-21 10:11:25 -0700677 public_include_dirs = []
678 if (skia_enable_gpu) {
679 public_defines = []
680 public_include_dirs += [ "tools/gpu" ]
mtkleind68f9b02016-09-23 13:18:41 -0700681
682 deps = []
mtklein38925aa2016-09-21 10:11:25 -0700683 sources = [
684 "tools/gpu/GrContextFactory.cpp",
685 "tools/gpu/GrTest.cpp",
686 "tools/gpu/TestContext.cpp",
687 "tools/gpu/gl/GLTestContext.cpp",
mtklein605d9522016-09-21 14:01:32 -0700688 "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
mtklein38925aa2016-09-21 10:11:25 -0700689 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
690 "tools/gpu/gl/debug/GrBufferObj.cpp",
691 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
692 "tools/gpu/gl/debug/GrProgramObj.cpp",
693 "tools/gpu/gl/debug/GrShaderObj.cpp",
694 "tools/gpu/gl/debug/GrTextureObj.cpp",
695 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
696 "tools/gpu/gl/null/NullGLTestContext.cpp",
697 ]
698 libs = []
mtklein25c81d42016-07-27 13:55:26 -0700699
mtklein38925aa2016-09-21 10:11:25 -0700700 if (is_android) {
701 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
702 } else if (is_linux) {
703 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
704 } else if (is_mac) {
705 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
706 }
mtklein6ef69992016-09-14 06:12:09 -0700707
mtkleind68f9b02016-09-23 13:18:41 -0700708 if (skia_use_angle) {
709 public_defines += [ "SK_ANGLE" ]
710 deps += [ "//third_party/angle2" ]
711 sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
mtklein38925aa2016-09-21 10:11:25 -0700712 }
713 if (skia_use_mesa) {
714 public_defines += [ "SK_MESA" ]
715 sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
716 libs += [ "OSMesa" ]
717 }
mtkleind68f9b02016-09-23 13:18:41 -0700718 if (skia_use_vulkan) {
719 sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
720 }
mtkleina627b5c2016-09-20 13:36:47 -0700721 }
mtklein25c81d42016-07-27 13:55:26 -0700722 }
mtklein25c81d42016-07-27 13:55:26 -0700723
mtkleinc095df52016-08-24 12:23:52 -0700724 test_lib("flags") {
725 public_include_dirs = [ "tools/flags" ]
726 sources = [
727 "tools/flags/SkCommandLineFlags.cpp",
mtklein046cb562016-09-16 10:23:12 -0700728 ]
729 }
730 test_lib("common_flags") {
731 public_include_dirs = [ "tools/flags" ]
732 sources = [
mtkleinc095df52016-08-24 12:23:52 -0700733 "tools/flags/SkCommonFlags.cpp",
734 "tools/flags/SkCommonFlagsConfig.cpp",
735 ]
736 deps = [
mtklein046cb562016-09-16 10:23:12 -0700737 ":flags",
mtkleinc095df52016-08-24 12:23:52 -0700738 ":gpu_tool_utils",
739 ]
740 }
mtklein25c81d42016-07-27 13:55:26 -0700741
mtkleinc095df52016-08-24 12:23:52 -0700742 test_lib("tool_utils") {
743 public_include_dirs = [
744 "tools",
745 "tools/debugger",
746 "tools/timer",
747 ]
748 sources = [
749 "src/images/SkForceLinking.cpp",
750 "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools?
mtkleinb37c0342016-09-09 11:07:45 -0700751 "tools/AndroidSkDebugToStdOut.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700752 "tools/CrashHandler.cpp",
mtklein0590fa52016-09-01 07:06:54 -0700753 "tools/LsanSuppressions.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700754 "tools/ProcStats.cpp",
755 "tools/Resources.cpp",
756 "tools/ThermalManager.cpp",
757 "tools/UrlDataManager.cpp",
758 "tools/debugger/SkDebugCanvas.cpp",
759 "tools/debugger/SkDrawCommand.cpp",
760 "tools/debugger/SkJsonWriteBuffer.cpp",
761 "tools/debugger/SkObjectParser.cpp",
762 "tools/debugger/SkOverdrawMode.cpp",
763 "tools/picture_utils.cpp",
764 "tools/random_parse_path.cpp",
765 "tools/sk_tool_utils.cpp",
766 "tools/sk_tool_utils_font.cpp",
767 "tools/timer/Timer.cpp",
768 ]
769 deps = [
mtklein046cb562016-09-16 10:23:12 -0700770 ":common_flags",
mtkleinc095df52016-08-24 12:23:52 -0700771 ":flags",
772 "//third_party/libpng",
773 ]
774 public_deps = [
775 "//third_party/jsoncpp",
776 ]
777 }
mtklein25c81d42016-07-27 13:55:26 -0700778
mtkleinc095df52016-08-24 12:23:52 -0700779 gm_sources = exec_script("gyp/find.py",
780 [
781 "*.c*",
782 rebase_path("gm"),
783 ],
784 "list lines",
785 [])
786 test_lib("gm") {
787 public_include_dirs = [ "gm" ]
788 sources = gm_sources
789 deps = [
790 ":gpu_tool_utils",
791 ":skia",
792 ":tool_utils",
793 ]
794 }
mtklein25c81d42016-07-27 13:55:26 -0700795
mtkleinc095df52016-08-24 12:23:52 -0700796 tests_sources = exec_script("gyp/find.py",
797 [
798 "*.c*",
799 rebase_path("tests"),
800 ],
801 "list lines",
802 [])
mtklein2f3416d2016-08-02 16:02:05 -0700803
mtkleinc095df52016-08-24 12:23:52 -0700804 test_lib("tests") {
805 public_include_dirs = [ "tests" ]
mtkleina45be612016-08-29 15:22:10 -0700806 sources = tests_sources - [
807 rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main
mtkleina45be612016-08-29 15:22:10 -0700808 rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile
809 rebase_path("tests/skia_test.cpp"), # alternate main
810 ]
811 if (!fontmgr_android_enabled) {
812 sources -= [ rebase_path("tests/FontMgrAndroidParserTest.cpp") ]
813 }
mtkleinc095df52016-08-24 12:23:52 -0700814 deps = [
fmalita6cf896d2016-08-25 08:44:35 -0700815 ":experimental_svg_model",
mtkleinc095df52016-08-24 12:23:52 -0700816 ":flags",
817 ":gpu_tool_utils",
818 ":skia",
819 ":tool_utils",
820 "//third_party/libpng",
821 "//third_party/zlib",
822 ]
823 }
mtklein2f3416d2016-08-02 16:02:05 -0700824
mtkleinc095df52016-08-24 12:23:52 -0700825 bench_sources = exec_script("gyp/find.py",
826 [
827 "*.c*",
828 rebase_path("bench"),
829 ],
830 "list lines",
831 [])
mtklein25c81d42016-07-27 13:55:26 -0700832
mtkleinc095df52016-08-24 12:23:52 -0700833 test_lib("bench") {
834 public_include_dirs = [ "bench" ]
835 sources = bench_sources
836 sources -= [
837 rebase_path("bench/nanobench.cpp"),
838 rebase_path("bench/nanobenchAndroid.cpp"),
839 ]
840 deps = [
841 ":flags",
842 ":gm",
843 ":gpu_tool_utils",
844 ":skia",
845 ":tool_utils",
846 ]
847 }
mtklein2b6870c2016-07-28 14:17:33 -0700848
mtkleinc095df52016-08-24 12:23:52 -0700849 test_lib("experimental_svg_model") {
850 public_include_dirs = [ "experimental/svg/model" ]
851 sources = [
852 "experimental/svg/model/SkSVGAttribute.cpp",
853 "experimental/svg/model/SkSVGAttributeParser.cpp",
854 "experimental/svg/model/SkSVGCircle.cpp",
855 "experimental/svg/model/SkSVGContainer.cpp",
856 "experimental/svg/model/SkSVGDOM.cpp",
857 "experimental/svg/model/SkSVGEllipse.cpp",
858 "experimental/svg/model/SkSVGLine.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700859 "experimental/svg/model/SkSVGLinearGradient.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700860 "experimental/svg/model/SkSVGNode.cpp",
861 "experimental/svg/model/SkSVGPath.cpp",
862 "experimental/svg/model/SkSVGPoly.cpp",
863 "experimental/svg/model/SkSVGRect.cpp",
864 "experimental/svg/model/SkSVGRenderContext.cpp",
865 "experimental/svg/model/SkSVGSVG.cpp",
866 "experimental/svg/model/SkSVGShape.cpp",
fmalita28d5b722016-09-12 17:06:47 -0700867 "experimental/svg/model/SkSVGStop.cpp",
mtkleinc095df52016-08-24 12:23:52 -0700868 "experimental/svg/model/SkSVGTransformableNode.cpp",
869 "experimental/svg/model/SkSVGValue.cpp",
870 ]
871 deps = [
872 ":skia",
873 ]
874 }
fmalitaa2b9fdf2016-08-03 19:53:36 -0700875
mtklein2b6870c2016-07-28 14:17:33 -0700876 executable("dm") {
877 sources = [
878 "dm/DM.cpp",
879 "dm/DMJsonWriter.cpp",
880 "dm/DMSrcSink.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700881 ]
882 include_dirs = [ "tests" ]
883 deps = [
mtklein046cb562016-09-16 10:23:12 -0700884 ":common_flags",
fmalitaa2b9fdf2016-08-03 19:53:36 -0700885 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700886 ":flags",
887 ":gm",
888 ":gpu_tool_utils",
889 ":skia",
mtklein2f3416d2016-08-02 16:02:05 -0700890 ":tests",
mtklein2b6870c2016-07-28 14:17:33 -0700891 ":tool_utils",
892 "//third_party/jsoncpp",
893 "//third_party/libpng",
894 ]
895 testonly = true
896 }
897
Mike Kleina3430172016-09-27 16:46:29 -0400898 if (!is_debug) { # I've benchmarked debug code once too many times...
899 executable("monobench") {
900 sources = [
901 "tools/monobench.cpp",
902 ]
903 deps = [
904 ":bench",
905 ":skia",
906 ]
907 testonly = true
908 }
mtklein2b6870c2016-07-28 14:17:33 -0700909 }
910
911 executable("nanobench") {
912 sources = [
913 "bench/nanobench.cpp",
914 ]
915 deps = [
916 ":bench",
mtklein046cb562016-09-16 10:23:12 -0700917 ":common_flags",
fmalita6519c212016-09-14 08:05:17 -0700918 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700919 ":flags",
920 ":gm",
921 ":gpu_tool_utils",
922 ":skia",
923 ":tool_utils",
924 "//third_party/jsoncpp",
925 ]
926 testonly = true
927 }
halcanary19a97202016-08-03 15:08:04 -0700928
mtklein38925aa2016-09-21 10:11:25 -0700929 if (skia_enable_gpu) {
930 executable("skpbench") {
931 sources = [
932 "tools/skpbench/skpbench.cpp",
933 ]
934 deps = [
935 ":flags",
936 ":gpu_tool_utils",
937 ":skia",
938 ":tool_utils",
939 ]
940 testonly = true
941 }
csmartdalton4b5179b2016-09-19 11:03:58 -0700942 }
943
mtklein6f5df6a2016-08-29 16:01:10 -0700944 if (current_cpu != "mipsel") { # Clang 3.8 crashes while compiling hb-icu.cc for mipsel.
halcanary3eee9d92016-09-10 07:01:53 -0700945 executable("sktexttopdf-hb") {
mtklein6f5df6a2016-08-29 16:01:10 -0700946 sources = [
947 "tools/SkShaper_harfbuzz.cpp",
948 "tools/using_skia_and_harfbuzz.cpp",
949 ]
950 deps = [
951 ":skia",
952 "//third_party/harfbuzz",
953 ]
954 testonly = true
955 }
halcanary19a97202016-08-03 15:08:04 -0700956 }
halcanary3eee9d92016-09-10 07:01:53 -0700957 executable("sktexttopdf") {
958 sources = [
959 "tools/SkShaper_primitive.cpp",
960 "tools/using_skia_and_harfbuzz.cpp",
961 ]
962 deps = [
963 ":skia",
964 ]
965 testonly = true
966 }
mtklein046cb562016-09-16 10:23:12 -0700967
968 executable("get_images_from_skps") {
969 sources = [
970 "tools/get_images_from_skps.cpp",
971 ]
972 deps = [
973 ":flags",
974 ":skia",
975 "//third_party/jsoncpp",
976 ]
977 testonly = true
978 }
mtkleinecbc5262016-09-22 11:51:24 -0700979
980 executable("skiaserve") {
981 sources = [
982 "tools/skiaserve/Request.cpp",
983 "tools/skiaserve/Response.cpp",
984 "tools/skiaserve/skiaserve.cpp",
985 "tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp",
986 "tools/skiaserve/urlhandlers/BatchesHandler.cpp",
987 "tools/skiaserve/urlhandlers/BreakHandler.cpp",
988 "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
989 "tools/skiaserve/urlhandlers/CmdHandler.cpp",
990 "tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
991 "tools/skiaserve/urlhandlers/DataHandler.cpp",
992 "tools/skiaserve/urlhandlers/DownloadHandler.cpp",
993 "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
994 "tools/skiaserve/urlhandlers/ImgHandler.cpp",
995 "tools/skiaserve/urlhandlers/InfoHandler.cpp",
996 "tools/skiaserve/urlhandlers/PostHandler.cpp",
997 "tools/skiaserve/urlhandlers/QuitHandler.cpp",
998 "tools/skiaserve/urlhandlers/RootHandler.cpp",
999 ]
1000 deps = [
1001 ":flags",
1002 ":gpu_tool_utils",
1003 ":skia",
1004 ":tool_utils",
1005 "//third_party/jsoncpp",
1006 "//third_party/libmicrohttpd",
1007 "//third_party/libpng",
1008 ]
1009 testonly = true
1010 }
kjlubick14f984b2016-10-03 11:49:45 -07001011
1012 executable("fuzz") {
1013 sources = [
1014 "fuzz/FilterFuzz.cpp",
1015 "fuzz/FuzzGradients.cpp",
1016 "fuzz/FuzzParsePath.cpp",
1017 "fuzz/FuzzPathop.cpp",
1018 "fuzz/FuzzScaleToSides.cpp",
1019 "fuzz/fuzz.cpp",
1020 ]
1021 deps = [
1022 ":flags",
1023 ":skia",
1024 ]
1025 testonly = true
1026 }
Mike Klein38312422016-10-05 15:41:01 -04001027
1028 executable("dump_record") {
1029 sources = [
1030 "tools/DumpRecord.cpp",
1031 "tools/dump_record.cpp",
1032 ]
1033 deps = [
1034 ":flags",
1035 ":skia",
1036 ]
1037 testonly = true
1038 }
mtklein25c81d42016-07-27 13:55:26 -07001039}