blob: 76b04d59b611fdfb5eb9f636f663e9d157baaf5c [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
6declare_args() {
7}
8
mtklein1211e0c2016-07-26 13:55:45 -07009skia_public_includes = [
mtklein25c81d42016-07-27 13:55:26 -070010 "include/android",
mtkleinfa84d942016-07-28 09:45:14 -070011 "include/c",
mtklein1211e0c2016-07-26 13:55:45 -070012 "include/codec",
13 "include/config",
14 "include/core",
15 "include/effects",
16 "include/gpu",
17 "include/gpu/gl",
18 "include/images",
19 "include/pathops",
20 "include/ports",
mtklein25c81d42016-07-27 13:55:26 -070021 "include/svg",
mtklein1211e0c2016-07-26 13:55:45 -070022 "include/utils",
23 "include/utils/mac",
mtklein25c81d42016-07-27 13:55:26 -070024 "include/xml",
mtklein1211e0c2016-07-26 13:55:45 -070025]
26
mtkleinc04ff472016-06-23 10:29:30 -070027# Skia public API, generally provided by :skia.
28config("skia_public") {
mtklein1211e0c2016-07-26 13:55:45 -070029 include_dirs = skia_public_includes
mtkleinc04ff472016-06-23 10:29:30 -070030 defines = [ "SKIA_DLL" ]
31}
32
33# Skia internal APIs, used by Skia itself and a few test tools.
34config("skia_private") {
35 visibility = [ ":*" ]
36
37 include_dirs = [
38 "include/private",
39 "src/c",
mtklein1211e0c2016-07-26 13:55:45 -070040 "src/codec",
mtkleinc04ff472016-06-23 10:29:30 -070041 "src/config",
42 "src/core",
43 "src/effects",
mtklein25c81d42016-07-27 13:55:26 -070044 "src/effects/gradients",
45 "src/fonts",
mtkleinc04ff472016-06-23 10:29:30 -070046 "src/gpu",
47 "src/image",
48 "src/images",
49 "src/lazy",
50 "src/opts",
51 "src/pathops",
mtklein2b6870c2016-07-28 14:17:33 -070052 "src/pdf",
mtkleinc04ff472016-06-23 10:29:30 -070053 "src/ports",
54 "src/sfnt",
55 "src/utils",
mtklein7a1f45f2016-08-04 06:19:33 -070056 "src/utils/win",
mtkleinc04ff472016-06-23 10:29:30 -070057 "third_party/etc1",
58 "third_party/ktx",
59 ]
mtklein150d1132016-08-01 06:56:40 -070060
61 defines = [
mtklein9be68662016-08-01 08:37:48 -070062 "SK_GAMMA_APPLY_TO_A8",
63
mtklein150d1132016-08-01 06:56:40 -070064 "SK_HAS_GIF_LIBRARY",
65 "SK_HAS_JPEG_LIBRARY",
66 "SK_HAS_PNG_LIBRARY",
67 "SK_HAS_WEBP_LIBRARY",
mtklein7c1ae7a2016-08-01 15:50:27 -070068
halcanary19a97202016-08-03 15:08:04 -070069 # TODO(halcanary): make this the default; this is the value Android uses.
70 "SK_SFNTLY_SUBSETTER=\"sample/chromium/font_subsetter.h\"",
71
mtklein7c1ae7a2016-08-01 15:50:27 -070072 "TURBO_HAS_565",
73 "TURBO_HAS_CROP",
74 "TURBO_HAS_SKIP",
mtklein150d1132016-08-01 06:56:40 -070075 ]
mtkleinee269f42016-08-04 09:52:11 -070076 if (is_linux) {
77 defines += [ "SK_SAMPLES_FOR_X" ]
78 }
mtkleinc04ff472016-06-23 10:29:30 -070079}
80
81# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
82config("skia_library") {
83 visibility = [ ":*" ]
mtkleinc04ff472016-06-23 10:29:30 -070084 defines = [ "SKIA_IMPLEMENTATION=1" ]
85}
86
87skia_library_configs = [
88 ":skia_public",
89 ":skia_private",
90 ":skia_library",
91]
92
mtklein7fbfbbe2016-07-21 12:25:45 -070093core_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -070094 [
95 rebase_path("gyp/core.gypi"),
96 "--replace=<(skia_include_path)=include",
97 "--replace=<(skia_src_path)=src",
98 ],
99 "scope",
100 [ "gyp/core.gypi" ])
101
mtklein7fbfbbe2016-07-21 12:25:45 -0700102effects_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700103 [
104 rebase_path("gyp/effects.gypi"),
105 "--replace=<(skia_include_path)=include",
106 "--replace=<(skia_src_path)=src",
107 ],
108 "scope",
109 [ "gyp/effects.gypi" ])
110
mtklein7fbfbbe2016-07-21 12:25:45 -0700111gpu_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700112 [
113 rebase_path("gyp/gpu.gypi"),
114 "--replace=<(skia_include_path)=include",
115 "--replace=<(skia_src_path)=src",
116 ],
117 "scope",
118 [ "gyp/gpu.gypi" ])
119
mtklein7fbfbbe2016-07-21 12:25:45 -0700120opts_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700121 [
122 rebase_path("gyp/opts.gypi"),
123 "--replace=<(skia_include_path)=include",
124 "--replace=<(skia_src_path)=src",
125 ],
126 "scope",
127 [ "gyp/opts.gypi" ])
128
mtklein7fbfbbe2016-07-21 12:25:45 -0700129pdf_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700130 [
131 rebase_path("gyp/pdf.gypi"),
132 "--replace=<(skia_include_path)=include",
133 "--replace=<(skia_src_path)=src",
134 ],
135 "scope",
136 [ "gyp/pdf.gypi" ])
137
mtklein7fbfbbe2016-07-21 12:25:45 -0700138utils_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700139 [
140 rebase_path("gyp/utils.gypi"),
141 "--replace=<(skia_include_path)=include",
142 "--replace=<(skia_src_path)=src",
143 ],
144 "scope",
145 [ "gyp/utils.gypi" ])
146
147source_set("opts_ssse3") {
148 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700149
150 sources = opts_gypi.ssse3_sources
151 cflags = [ "-mssse3" ]
152}
153
154source_set("opts_sse41") {
155 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700156
157 sources = opts_gypi.sse41_sources
158 cflags = [ "-msse4.1" ]
159}
160
161source_set("opts_avx") {
162 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700163
164 sources = opts_gypi.avx_sources
165 cflags = [ "-mavx" ]
166}
167
168component("skia") {
169 public_configs = [ ":skia_public" ]
170 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700171
172 deps = [
173 ":opts_avx",
174 ":opts_sse41",
175 ":opts_ssse3",
mtklein25c81d42016-07-27 13:55:26 -0700176 "//third_party/expat",
177 "//third_party/giflib",
mtklein7d10b9f2016-07-27 11:17:18 -0700178 "//third_party/libjpeg_turbo",
179 "//third_party/libpng",
mtklein25c81d42016-07-27 13:55:26 -0700180 "//third_party/libwebp",
halcanary19a97202016-08-03 15:08:04 -0700181 "//third_party/sfntly",
abarth6fc8ff02016-07-15 15:15:15 -0700182 "//third_party/zlib",
mtkleinc04ff472016-06-23 10:29:30 -0700183 ]
184
mtklein7a1f45f2016-08-04 06:19:33 -0700185 if (!is_win) {
186 libs = [ "pthread" ]
187 }
mtkleinc04ff472016-06-23 10:29:30 -0700188
189 sources = []
190 sources += core_gypi.sources
191 sources += effects_gypi.sources
192 sources += gpu_gypi.skgpu_sources
193 sources += opts_gypi.sse2_sources
194 sources += pdf_gypi.sources
195 sources += utils_gypi.sources
196 sources += [
mtklein25c81d42016-07-27 13:55:26 -0700197 "src/android/SkBitmapRegionCodec.cpp",
198 "src/android/SkBitmapRegionDecoder.cpp",
199 "src/codec/SkAndroidCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700200 "src/codec/SkBmpCodec.cpp",
201 "src/codec/SkBmpMaskCodec.cpp",
202 "src/codec/SkBmpRLECodec.cpp",
203 "src/codec/SkBmpStandardCodec.cpp",
204 "src/codec/SkCodec.cpp",
205 "src/codec/SkCodecImageGenerator.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700206 "src/codec/SkGifCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700207 "src/codec/SkIcoCodec.cpp",
208 "src/codec/SkJpegCodec.cpp",
209 "src/codec/SkJpegDecoderMgr.cpp",
210 "src/codec/SkJpegUtility.cpp",
211 "src/codec/SkMaskSwizzler.cpp",
212 "src/codec/SkMasks.cpp",
213 "src/codec/SkPngCodec.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700214 "src/codec/SkSampledCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700215 "src/codec/SkSampler.cpp",
216 "src/codec/SkSwizzler.cpp",
217 "src/codec/SkWbmpCodec.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700218 "src/codec/SkWebpAdapterCodec.cpp",
219 "src/codec/SkWebpCodec.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700220 "src/images/SkImageEncoder.cpp",
221 "src/images/SkImageEncoder_Factory.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700222 "src/images/SkJPEGImageEncoder.cpp",
223 "src/images/SkJPEGWriteUtility.cpp",
224 "src/images/SkKTXImageEncoder.cpp",
225 "src/images/SkPNGImageEncoder.cpp",
226 "src/images/SkWEBPImageEncoder.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700227 "src/ports/SkDiscardableMemory_none.cpp",
228 "src/ports/SkGlobalInitialization_default.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700229 "src/ports/SkImageGenerator_skia.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700230 "src/ports/SkMemory_malloc.cpp",
231 "src/ports/SkOSFile_stdio.cpp",
232 "src/sfnt/SkOTTable_name.cpp",
233 "src/sfnt/SkOTUtils.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700234 "src/svg/SkSVGCanvas.cpp",
235 "src/svg/SkSVGDevice.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700236 "src/utils/mac/SkStream_mac.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700237 "src/xml/SkDOM.cpp",
238 "src/xml/SkXMLParser.cpp",
239 "src/xml/SkXMLWriter.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700240 "third_party/etc1/etc1.cpp",
241 "third_party/ktx/ktx.cpp",
242 ]
243
244 if (is_win) {
245 sources += [
246 "src/ports/SkDebug_win.cpp",
247 "src/ports/SkFontHost_win.cpp",
248 "src/ports/SkFontMgr_win_dw.cpp",
249 "src/ports/SkFontMgr_win_dw_factory.cpp",
250 "src/ports/SkImageEncoder_WIC.cpp",
251 "src/ports/SkImageGeneratorWIC.cpp",
252 "src/ports/SkOSFile_win.cpp",
253 "src/ports/SkScalerContext_win_dw.cpp",
254 "src/ports/SkTLS_win.cpp",
255 "src/ports/SkTypeface_win_dw.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700256 "src/xps/SkDocument_XPS.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700257 ]
mtklein7a1f45f2016-08-04 06:19:33 -0700258 sources -= [ "src/utils/SkThreadUtils_pthread.cpp" ]
mtkleinc04ff472016-06-23 10:29:30 -0700259 } else {
260 sources += [
261 "src/ports/SkDebug_stdio.cpp",
262 "src/ports/SkOSFile_posix.cpp",
263 "src/ports/SkTLS_pthread.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700264 "src/xps/SkDocument_XPS_None.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700265 ]
266 }
267
268 if (is_linux) {
269 deps += [
270 "third_party:fontconfig",
271 "third_party:freetype2",
mtkleinc04ff472016-06-23 10:29:30 -0700272 ]
273 sources += [
mtkleinc04ff472016-06-23 10:29:30 -0700274 "src/ports/SkFontConfigInterface_direct.cpp",
275 "src/ports/SkFontConfigInterface_direct_factory.cpp",
276 "src/ports/SkFontHost_FreeType.cpp",
277 "src/ports/SkFontHost_FreeType_common.cpp",
bungeman7d0e3bc2016-08-02 07:07:33 -0700278 "src/ports/SkFontMgr_FontConfigInterface.cpp",
mtklein7a34b1c2016-08-01 13:08:46 -0700279 "src/ports/SkFontMgr_fontconfig.cpp",
280 "src/ports/SkFontMgr_fontconfig_factory.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700281 ]
282 }
283
284 if (is_mac) {
285 sources += [
286 "src/ports/SkFontHost_mac.cpp",
287 "src/ports/SkImageEncoder_CG.cpp",
288 "src/ports/SkImageGeneratorCG.cpp",
289 ]
290 libs += [ "ApplicationServices.framework" ]
291 }
abarth6fc8ff02016-07-15 15:15:15 -0700292
293 if (is_fuchsia) {
mtkleine817ddf2016-07-19 06:03:22 -0700294 sources += [ "src/ports/SkFontMgr_empty_factory.cpp" ]
abarth6fc8ff02016-07-15 15:15:15 -0700295 }
mtkleinc04ff472016-06-23 10:29:30 -0700296}
297
mtkleinada5a442016-08-02 14:28:26 -0700298skia_h_headers = exec_script("gyp/find.py",
299 [ "*.h" ] + rebase_path(skia_public_includes),
300 "list lines",
301 []) -
302 [
303 rebase_path("include/gpu/gl/GrGLConfig_chrome.h"),
304 rebase_path("include/gpu/vk/GrVkBackendContext.h"),
305 rebase_path("include/gpu/vk/GrVkDefines.h"),
306 rebase_path("include/gpu/vk/GrVkInterface.h"),
307 rebase_path("include/gpu/vk/GrVkTypes.h"),
308 rebase_path("include/ports/SkFontMgr_fontconfig.h"),
309 ]
310
mtklein1211e0c2016-07-26 13:55:45 -0700311action("skia.h") {
312 script = "gn/echo_headers.py"
313 args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] +
mtkleinada5a442016-08-02 14:28:26 -0700314 rebase_path(skia_h_headers, root_build_dir)
mtklein1211e0c2016-07-26 13:55:45 -0700315 outputs = [
316 "$target_gen_dir/skia.h",
317 ]
318}
319
320executable("fiddle") {
321 include_dirs = [ "$target_gen_dir" ]
mtklein7d10b9f2016-07-27 11:17:18 -0700322 libs = []
323 if (is_linux) {
324 libs += [ "OSMesa" ]
325 }
mtklein1211e0c2016-07-26 13:55:45 -0700326
mtkleinc04ff472016-06-23 10:29:30 -0700327 sources = [
mtklein1211e0c2016-07-26 13:55:45 -0700328 "tools/fiddle/draw.cpp",
329 "tools/fiddle/fiddle_main.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700330 ]
331 deps = [
332 ":skia",
mtklein1211e0c2016-07-26 13:55:45 -0700333 ":skia.h",
mtklein5dbd2742016-08-02 11:13:48 -0700334 ":tool_utils",
mtkleinc04ff472016-06-23 10:29:30 -0700335 ]
mtklein5dbd2742016-08-02 11:13:48 -0700336 testonly = true
mtkleinc04ff472016-06-23 10:29:30 -0700337}
mtklein25c81d42016-07-27 13:55:26 -0700338
339template("test_lib") {
340 config(target_name + "_config") {
341 include_dirs = invoker.public_include_dirs
342 }
343 source_set(target_name) {
344 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
345 public_configs = [
346 ":" + target_name + "_config",
347 ":skia_private",
348 ]
349
350 if (!defined(deps)) {
351 deps = []
352 }
353 deps += [ ":skia" ]
354 testonly = true
355 }
356}
357
358test_lib("gpu_tool_utils") {
359 public_include_dirs = [ "tools/gpu" ]
360 sources = [
361 "tools/gpu/GrContextFactory.cpp",
362 "tools/gpu/GrTest.cpp",
363 "tools/gpu/TestContext.cpp",
364 "tools/gpu/gl/GLTestContext.cpp",
365 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
366 "tools/gpu/gl/debug/GrBufferObj.cpp",
367 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
368 "tools/gpu/gl/debug/GrProgramObj.cpp",
369 "tools/gpu/gl/debug/GrShaderObj.cpp",
370 "tools/gpu/gl/debug/GrTextureObj.cpp",
371 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
372 "tools/gpu/gl/null/NullGLTestContext.cpp",
373 ]
374 libs = []
375
376 if (is_linux) {
mtklein5259da52016-08-03 08:28:20 -0700377 sources += [
mtklein4db3b792016-08-03 14:18:22 -0700378 "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp",
379 "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp",
mtklein5259da52016-08-03 08:28:20 -0700380 ]
mtklein25c81d42016-07-27 13:55:26 -0700381 libs += [
382 "GL",
383 "GLU",
384 "X11",
385 ]
386 } else if (is_mac) {
mtklein5259da52016-08-03 08:28:20 -0700387 sources += [
mtklein4db3b792016-08-03 14:18:22 -0700388 "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp",
389 "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp",
mtklein5259da52016-08-03 08:28:20 -0700390 ]
mtklein25c81d42016-07-27 13:55:26 -0700391 libs += [ "OpenGL.framework" ]
392 }
393}
394
395test_lib("flags") {
396 public_include_dirs = [ "tools/flags" ]
397 sources = [
398 "tools/flags/SkCommandLineFlags.cpp",
399 "tools/flags/SkCommonFlags.cpp",
400 "tools/flags/SkCommonFlagsConfig.cpp",
401 ]
402 deps = [
403 ":gpu_tool_utils",
404 ]
405}
406
407test_lib("tool_utils") {
408 public_include_dirs = [
409 "tools",
mtklein2f3416d2016-08-02 16:02:05 -0700410 "tools/debugger",
mtklein25c81d42016-07-27 13:55:26 -0700411 "tools/timer",
412 ]
413 sources = [
mtklein2b6870c2016-07-28 14:17:33 -0700414 "src/images/SkForceLinking.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700415 "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools?
mtklein2b6870c2016-07-28 14:17:33 -0700416 "tools/CrashHandler.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700417 "tools/ProcStats.cpp",
418 "tools/Resources.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700419 "tools/ThermalManager.cpp",
mtklein2f3416d2016-08-02 16:02:05 -0700420 "tools/UrlDataManager.cpp",
421 "tools/debugger/SkDebugCanvas.cpp",
422 "tools/debugger/SkDrawCommand.cpp",
423 "tools/debugger/SkJsonWriteBuffer.cpp",
424 "tools/debugger/SkObjectParser.cpp",
425 "tools/debugger/SkOverdrawMode.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700426 "tools/picture_utils.cpp",
427 "tools/random_parse_path.cpp",
428 "tools/sk_tool_utils.cpp",
429 "tools/sk_tool_utils_font.cpp",
430 "tools/timer/Timer.cpp",
431 ]
432 deps = [
433 ":flags",
mtklein2f3416d2016-08-02 16:02:05 -0700434 "//third_party/libpng",
435 ]
436 public_deps = [
437 "//third_party/jsoncpp",
mtklein25c81d42016-07-27 13:55:26 -0700438 ]
439}
440
441gm_sources = exec_script("gyp/find.py",
442 [
mtklein25c81d42016-07-27 13:55:26 -0700443 "*.c*",
mtkleinada5a442016-08-02 14:28:26 -0700444 rebase_path("gm"),
mtklein25c81d42016-07-27 13:55:26 -0700445 ],
446 "list lines",
447 [])
448test_lib("gm") {
449 public_include_dirs = [ "gm" ]
450 sources = gm_sources
451 deps = [
452 ":gpu_tool_utils",
453 ":skia",
454 ":tool_utils",
455 ]
456}
457
mtklein2f3416d2016-08-02 16:02:05 -0700458tests_sources = exec_script("gyp/find.py",
459 [
460 "*.c*",
461 rebase_path("tests"),
462 ],
463 "list lines",
464 [])
465
466test_lib("tests") {
467 public_include_dirs = [ "tests" ]
468 sources = tests_sources - [
469 rebase_path("tests/FontMgrAndroidParserTest.cpp"), # Android only
470 rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main
mtklein4db3b792016-08-03 14:18:22 -0700471 rebase_path("tests/SkSLErrorTest.cpp"), # TODO: make work
472 rebase_path("tests/SkSLGLSLTest.cpp"), # TODO: make work
mtklein2f3416d2016-08-02 16:02:05 -0700473 rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile
474 rebase_path("tests/skia_test.cpp"), # alternate main
475 ]
476 deps = [
477 ":flags",
478 ":gpu_tool_utils",
479 ":skia",
480 ":tool_utils",
481 "//third_party/libpng",
482 "//third_party/zlib",
483 ]
484}
485
mtklein2b6870c2016-07-28 14:17:33 -0700486bench_sources = exec_script("gyp/find.py",
487 [
mtklein2b6870c2016-07-28 14:17:33 -0700488 "*.c*",
mtkleinada5a442016-08-02 14:28:26 -0700489 rebase_path("bench"),
mtklein2b6870c2016-07-28 14:17:33 -0700490 ],
491 "list lines",
492 [])
mtklein25c81d42016-07-27 13:55:26 -0700493
mtklein2b6870c2016-07-28 14:17:33 -0700494test_lib("bench") {
495 public_include_dirs = [ "bench" ]
496 sources = bench_sources
497 sources -= [
498 rebase_path("bench/nanobench.cpp"),
499 rebase_path("bench/nanobenchAndroid.cpp"),
500 ]
501 deps = [
502 ":flags",
503 ":gm",
504 ":gpu_tool_utils",
505 ":skia",
506 ":tool_utils",
507 ]
508}
509
fmalitaa2b9fdf2016-08-03 19:53:36 -0700510test_lib("experimental_svg_model") {
511 public_include_dirs = [ "experimental/svg/model" ]
512 sources = [
513 "experimental/svg/model/SkSVGAttribute.cpp",
514 "experimental/svg/model/SkSVGAttributeParser.cpp",
515 "experimental/svg/model/SkSVGContainer.cpp",
516 "experimental/svg/model/SkSVGDOM.cpp",
517 "experimental/svg/model/SkSVGNode.cpp",
518 "experimental/svg/model/SkSVGPath.cpp",
519 "experimental/svg/model/SkSVGRect.cpp",
520 "experimental/svg/model/SkSVGRenderContext.cpp",
521 "experimental/svg/model/SkSVGSVG.cpp",
522 "experimental/svg/model/SkSVGShape.cpp",
523 "experimental/svg/model/SkSVGTransformableNode.cpp",
524 "experimental/svg/model/SkSVGValue.cpp",
525 ]
526 deps = [
527 ":skia",
528 ]
529}
530
mtklein2b6870c2016-07-28 14:17:33 -0700531if (!is_component_build) { # Our test tools use many non-SK_API APIs...
532 executable("dm") {
533 sources = [
534 "dm/DM.cpp",
535 "dm/DMJsonWriter.cpp",
536 "dm/DMSrcSink.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700537 ]
538 include_dirs = [ "tests" ]
539 deps = [
fmalitaa2b9fdf2016-08-03 19:53:36 -0700540 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700541 ":flags",
542 ":gm",
543 ":gpu_tool_utils",
544 ":skia",
mtklein2f3416d2016-08-02 16:02:05 -0700545 ":tests",
mtklein2b6870c2016-07-28 14:17:33 -0700546 ":tool_utils",
547 "//third_party/jsoncpp",
548 "//third_party/libpng",
549 ]
550 testonly = true
551 }
552
553 executable("monobench") {
554 sources = [
555 "tools/monobench.cpp",
556 ]
557 deps = [
558 ":bench",
559 ":skia",
560 ]
561 testonly = true
562 }
563
564 executable("nanobench") {
565 sources = [
566 "bench/nanobench.cpp",
567 ]
568 deps = [
569 ":bench",
570 ":flags",
571 ":gm",
572 ":gpu_tool_utils",
573 ":skia",
574 ":tool_utils",
575 "//third_party/jsoncpp",
576 ]
577 testonly = true
578 }
halcanary19a97202016-08-03 15:08:04 -0700579
580 executable("sktexttopdf") {
581 sources = [
582 "tools/SkShaper_harfbuzz.cpp",
583 "tools/using_skia_and_harfbuzz.cpp",
584 ]
585 deps = [
586 ":skia",
587 "//third_party/harfbuzz",
588 ]
589 testonly = true
590 }
mtklein25c81d42016-07-27 13:55:26 -0700591}