blob: e2a9a883c166dad4d0d1bc5257037d31a6e87a62 [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 ]
mtkleinc04ff472016-06-23 10:29:30 -070076}
77
78# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
79config("skia_library") {
80 visibility = [ ":*" ]
mtkleinc04ff472016-06-23 10:29:30 -070081 defines = [ "SKIA_IMPLEMENTATION=1" ]
82}
83
84skia_library_configs = [
85 ":skia_public",
86 ":skia_private",
87 ":skia_library",
88]
89
mtklein7fbfbbe2016-07-21 12:25:45 -070090core_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -070091 [
92 rebase_path("gyp/core.gypi"),
93 "--replace=<(skia_include_path)=include",
94 "--replace=<(skia_src_path)=src",
95 ],
96 "scope",
97 [ "gyp/core.gypi" ])
98
mtklein7fbfbbe2016-07-21 12:25:45 -070099effects_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700100 [
101 rebase_path("gyp/effects.gypi"),
102 "--replace=<(skia_include_path)=include",
103 "--replace=<(skia_src_path)=src",
104 ],
105 "scope",
106 [ "gyp/effects.gypi" ])
107
mtklein7fbfbbe2016-07-21 12:25:45 -0700108gpu_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700109 [
110 rebase_path("gyp/gpu.gypi"),
111 "--replace=<(skia_include_path)=include",
112 "--replace=<(skia_src_path)=src",
113 ],
114 "scope",
115 [ "gyp/gpu.gypi" ])
116
mtklein7fbfbbe2016-07-21 12:25:45 -0700117opts_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700118 [
119 rebase_path("gyp/opts.gypi"),
120 "--replace=<(skia_include_path)=include",
121 "--replace=<(skia_src_path)=src",
122 ],
123 "scope",
124 [ "gyp/opts.gypi" ])
125
mtklein7fbfbbe2016-07-21 12:25:45 -0700126pdf_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700127 [
128 rebase_path("gyp/pdf.gypi"),
129 "--replace=<(skia_include_path)=include",
130 "--replace=<(skia_src_path)=src",
131 ],
132 "scope",
133 [ "gyp/pdf.gypi" ])
134
mtklein7fbfbbe2016-07-21 12:25:45 -0700135utils_gypi = exec_script("gn/gypi_to_gn.py",
mtkleinc04ff472016-06-23 10:29:30 -0700136 [
137 rebase_path("gyp/utils.gypi"),
138 "--replace=<(skia_include_path)=include",
139 "--replace=<(skia_src_path)=src",
140 ],
141 "scope",
142 [ "gyp/utils.gypi" ])
143
144source_set("opts_ssse3") {
145 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700146
147 sources = opts_gypi.ssse3_sources
148 cflags = [ "-mssse3" ]
149}
150
151source_set("opts_sse41") {
152 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700153
154 sources = opts_gypi.sse41_sources
155 cflags = [ "-msse4.1" ]
156}
157
158source_set("opts_avx") {
159 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700160
161 sources = opts_gypi.avx_sources
162 cflags = [ "-mavx" ]
163}
164
165component("skia") {
166 public_configs = [ ":skia_public" ]
167 configs += skia_library_configs
mtkleinc04ff472016-06-23 10:29:30 -0700168
169 deps = [
170 ":opts_avx",
171 ":opts_sse41",
172 ":opts_ssse3",
mtklein25c81d42016-07-27 13:55:26 -0700173 "//third_party/expat",
174 "//third_party/giflib",
mtklein7d10b9f2016-07-27 11:17:18 -0700175 "//third_party/libjpeg_turbo",
176 "//third_party/libpng",
mtklein25c81d42016-07-27 13:55:26 -0700177 "//third_party/libwebp",
halcanary19a97202016-08-03 15:08:04 -0700178 "//third_party/sfntly",
abarth6fc8ff02016-07-15 15:15:15 -0700179 "//third_party/zlib",
mtkleinc04ff472016-06-23 10:29:30 -0700180 ]
181
mtklein7a1f45f2016-08-04 06:19:33 -0700182 if (!is_win) {
183 libs = [ "pthread" ]
184 }
mtkleinc04ff472016-06-23 10:29:30 -0700185
186 sources = []
187 sources += core_gypi.sources
188 sources += effects_gypi.sources
189 sources += gpu_gypi.skgpu_sources
190 sources += opts_gypi.sse2_sources
191 sources += pdf_gypi.sources
192 sources += utils_gypi.sources
193 sources += [
mtklein25c81d42016-07-27 13:55:26 -0700194 "src/android/SkBitmapRegionCodec.cpp",
195 "src/android/SkBitmapRegionDecoder.cpp",
196 "src/codec/SkAndroidCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700197 "src/codec/SkBmpCodec.cpp",
198 "src/codec/SkBmpMaskCodec.cpp",
199 "src/codec/SkBmpRLECodec.cpp",
200 "src/codec/SkBmpStandardCodec.cpp",
201 "src/codec/SkCodec.cpp",
202 "src/codec/SkCodecImageGenerator.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700203 "src/codec/SkGifCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700204 "src/codec/SkIcoCodec.cpp",
205 "src/codec/SkJpegCodec.cpp",
206 "src/codec/SkJpegDecoderMgr.cpp",
207 "src/codec/SkJpegUtility.cpp",
208 "src/codec/SkMaskSwizzler.cpp",
209 "src/codec/SkMasks.cpp",
210 "src/codec/SkPngCodec.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700211 "src/codec/SkSampledCodec.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700212 "src/codec/SkSampler.cpp",
213 "src/codec/SkSwizzler.cpp",
214 "src/codec/SkWbmpCodec.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700215 "src/codec/SkWebpAdapterCodec.cpp",
216 "src/codec/SkWebpCodec.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700217 "src/images/SkImageEncoder.cpp",
218 "src/images/SkImageEncoder_Factory.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700219 "src/images/SkJPEGImageEncoder.cpp",
220 "src/images/SkJPEGWriteUtility.cpp",
221 "src/images/SkKTXImageEncoder.cpp",
222 "src/images/SkPNGImageEncoder.cpp",
223 "src/images/SkWEBPImageEncoder.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700224 "src/ports/SkDiscardableMemory_none.cpp",
225 "src/ports/SkGlobalInitialization_default.cpp",
mtklein1211e0c2016-07-26 13:55:45 -0700226 "src/ports/SkImageGenerator_skia.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700227 "src/ports/SkMemory_malloc.cpp",
228 "src/ports/SkOSFile_stdio.cpp",
229 "src/sfnt/SkOTTable_name.cpp",
230 "src/sfnt/SkOTUtils.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700231 "src/svg/SkSVGCanvas.cpp",
232 "src/svg/SkSVGDevice.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700233 "src/utils/mac/SkStream_mac.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700234 "src/xml/SkDOM.cpp",
235 "src/xml/SkXMLParser.cpp",
236 "src/xml/SkXMLWriter.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700237 "third_party/etc1/etc1.cpp",
238 "third_party/ktx/ktx.cpp",
239 ]
240
241 if (is_win) {
242 sources += [
243 "src/ports/SkDebug_win.cpp",
244 "src/ports/SkFontHost_win.cpp",
245 "src/ports/SkFontMgr_win_dw.cpp",
246 "src/ports/SkFontMgr_win_dw_factory.cpp",
247 "src/ports/SkImageEncoder_WIC.cpp",
248 "src/ports/SkImageGeneratorWIC.cpp",
249 "src/ports/SkOSFile_win.cpp",
250 "src/ports/SkScalerContext_win_dw.cpp",
251 "src/ports/SkTLS_win.cpp",
252 "src/ports/SkTypeface_win_dw.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700253 "src/xps/SkDocument_XPS.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700254 ]
mtklein7a1f45f2016-08-04 06:19:33 -0700255 sources -= [ "src/utils/SkThreadUtils_pthread.cpp" ]
mtkleinc04ff472016-06-23 10:29:30 -0700256 } else {
257 sources += [
258 "src/ports/SkDebug_stdio.cpp",
259 "src/ports/SkOSFile_posix.cpp",
260 "src/ports/SkTLS_pthread.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700261 "src/xps/SkDocument_XPS_None.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700262 ]
263 }
264
265 if (is_linux) {
266 deps += [
267 "third_party:fontconfig",
268 "third_party:freetype2",
mtkleinc04ff472016-06-23 10:29:30 -0700269 ]
270 sources += [
mtkleinc04ff472016-06-23 10:29:30 -0700271 "src/ports/SkFontConfigInterface_direct.cpp",
272 "src/ports/SkFontConfigInterface_direct_factory.cpp",
273 "src/ports/SkFontHost_FreeType.cpp",
274 "src/ports/SkFontHost_FreeType_common.cpp",
bungeman7d0e3bc2016-08-02 07:07:33 -0700275 "src/ports/SkFontMgr_FontConfigInterface.cpp",
mtklein7a34b1c2016-08-01 13:08:46 -0700276 "src/ports/SkFontMgr_fontconfig.cpp",
277 "src/ports/SkFontMgr_fontconfig_factory.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700278 ]
279 }
280
281 if (is_mac) {
282 sources += [
283 "src/ports/SkFontHost_mac.cpp",
284 "src/ports/SkImageEncoder_CG.cpp",
285 "src/ports/SkImageGeneratorCG.cpp",
286 ]
287 libs += [ "ApplicationServices.framework" ]
288 }
abarth6fc8ff02016-07-15 15:15:15 -0700289
290 if (is_fuchsia) {
mtkleine817ddf2016-07-19 06:03:22 -0700291 sources += [ "src/ports/SkFontMgr_empty_factory.cpp" ]
abarth6fc8ff02016-07-15 15:15:15 -0700292 }
mtkleinc04ff472016-06-23 10:29:30 -0700293}
294
mtkleinada5a442016-08-02 14:28:26 -0700295skia_h_headers = exec_script("gyp/find.py",
296 [ "*.h" ] + rebase_path(skia_public_includes),
297 "list lines",
298 []) -
299 [
300 rebase_path("include/gpu/gl/GrGLConfig_chrome.h"),
301 rebase_path("include/gpu/vk/GrVkBackendContext.h"),
302 rebase_path("include/gpu/vk/GrVkDefines.h"),
303 rebase_path("include/gpu/vk/GrVkInterface.h"),
304 rebase_path("include/gpu/vk/GrVkTypes.h"),
305 rebase_path("include/ports/SkFontMgr_fontconfig.h"),
306 ]
307
mtklein1211e0c2016-07-26 13:55:45 -0700308action("skia.h") {
309 script = "gn/echo_headers.py"
310 args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] +
mtkleinada5a442016-08-02 14:28:26 -0700311 rebase_path(skia_h_headers, root_build_dir)
mtklein1211e0c2016-07-26 13:55:45 -0700312 outputs = [
313 "$target_gen_dir/skia.h",
314 ]
315}
316
317executable("fiddle") {
318 include_dirs = [ "$target_gen_dir" ]
mtklein7d10b9f2016-07-27 11:17:18 -0700319 libs = []
320 if (is_linux) {
321 libs += [ "OSMesa" ]
322 }
mtklein1211e0c2016-07-26 13:55:45 -0700323
mtkleinc04ff472016-06-23 10:29:30 -0700324 sources = [
mtklein1211e0c2016-07-26 13:55:45 -0700325 "tools/fiddle/draw.cpp",
326 "tools/fiddle/fiddle_main.cpp",
mtkleinc04ff472016-06-23 10:29:30 -0700327 ]
328 deps = [
329 ":skia",
mtklein1211e0c2016-07-26 13:55:45 -0700330 ":skia.h",
mtklein5dbd2742016-08-02 11:13:48 -0700331 ":tool_utils",
mtkleinc04ff472016-06-23 10:29:30 -0700332 ]
mtklein5dbd2742016-08-02 11:13:48 -0700333 testonly = true
mtkleinc04ff472016-06-23 10:29:30 -0700334}
mtklein25c81d42016-07-27 13:55:26 -0700335
336template("test_lib") {
337 config(target_name + "_config") {
338 include_dirs = invoker.public_include_dirs
339 }
340 source_set(target_name) {
341 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
342 public_configs = [
343 ":" + target_name + "_config",
344 ":skia_private",
345 ]
346
347 if (!defined(deps)) {
348 deps = []
349 }
350 deps += [ ":skia" ]
351 testonly = true
352 }
353}
354
355test_lib("gpu_tool_utils") {
356 public_include_dirs = [ "tools/gpu" ]
357 sources = [
358 "tools/gpu/GrContextFactory.cpp",
359 "tools/gpu/GrTest.cpp",
360 "tools/gpu/TestContext.cpp",
361 "tools/gpu/gl/GLTestContext.cpp",
362 "tools/gpu/gl/debug/DebugGLTestContext.cpp",
363 "tools/gpu/gl/debug/GrBufferObj.cpp",
364 "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
365 "tools/gpu/gl/debug/GrProgramObj.cpp",
366 "tools/gpu/gl/debug/GrShaderObj.cpp",
367 "tools/gpu/gl/debug/GrTextureObj.cpp",
368 "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
369 "tools/gpu/gl/null/NullGLTestContext.cpp",
370 ]
371 libs = []
372
373 if (is_linux) {
mtklein5259da52016-08-03 08:28:20 -0700374 sources += [
mtklein4db3b792016-08-03 14:18:22 -0700375 "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp",
376 "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp",
mtklein5259da52016-08-03 08:28:20 -0700377 ]
mtklein25c81d42016-07-27 13:55:26 -0700378 libs += [
379 "GL",
380 "GLU",
381 "X11",
382 ]
383 } else if (is_mac) {
mtklein5259da52016-08-03 08:28:20 -0700384 sources += [
mtklein4db3b792016-08-03 14:18:22 -0700385 "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp",
386 "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp",
mtklein5259da52016-08-03 08:28:20 -0700387 ]
mtklein25c81d42016-07-27 13:55:26 -0700388 libs += [ "OpenGL.framework" ]
389 }
390}
391
392test_lib("flags") {
393 public_include_dirs = [ "tools/flags" ]
394 sources = [
395 "tools/flags/SkCommandLineFlags.cpp",
396 "tools/flags/SkCommonFlags.cpp",
397 "tools/flags/SkCommonFlagsConfig.cpp",
398 ]
399 deps = [
400 ":gpu_tool_utils",
401 ]
402}
403
404test_lib("tool_utils") {
405 public_include_dirs = [
406 "tools",
mtklein2f3416d2016-08-02 16:02:05 -0700407 "tools/debugger",
mtklein25c81d42016-07-27 13:55:26 -0700408 "tools/timer",
409 ]
410 sources = [
mtklein2b6870c2016-07-28 14:17:33 -0700411 "src/images/SkForceLinking.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700412 "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to tools?
mtklein2b6870c2016-07-28 14:17:33 -0700413 "tools/CrashHandler.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700414 "tools/ProcStats.cpp",
415 "tools/Resources.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700416 "tools/ThermalManager.cpp",
mtklein2f3416d2016-08-02 16:02:05 -0700417 "tools/UrlDataManager.cpp",
418 "tools/debugger/SkDebugCanvas.cpp",
419 "tools/debugger/SkDrawCommand.cpp",
420 "tools/debugger/SkJsonWriteBuffer.cpp",
421 "tools/debugger/SkObjectParser.cpp",
422 "tools/debugger/SkOverdrawMode.cpp",
mtklein25c81d42016-07-27 13:55:26 -0700423 "tools/picture_utils.cpp",
424 "tools/random_parse_path.cpp",
425 "tools/sk_tool_utils.cpp",
426 "tools/sk_tool_utils_font.cpp",
427 "tools/timer/Timer.cpp",
428 ]
429 deps = [
430 ":flags",
mtklein2f3416d2016-08-02 16:02:05 -0700431 "//third_party/libpng",
432 ]
433 public_deps = [
434 "//third_party/jsoncpp",
mtklein25c81d42016-07-27 13:55:26 -0700435 ]
436}
437
438gm_sources = exec_script("gyp/find.py",
439 [
mtklein25c81d42016-07-27 13:55:26 -0700440 "*.c*",
mtkleinada5a442016-08-02 14:28:26 -0700441 rebase_path("gm"),
mtklein25c81d42016-07-27 13:55:26 -0700442 ],
443 "list lines",
444 [])
445test_lib("gm") {
446 public_include_dirs = [ "gm" ]
447 sources = gm_sources
448 deps = [
449 ":gpu_tool_utils",
450 ":skia",
451 ":tool_utils",
452 ]
453}
454
mtklein2f3416d2016-08-02 16:02:05 -0700455tests_sources = exec_script("gyp/find.py",
456 [
457 "*.c*",
458 rebase_path("tests"),
459 ],
460 "list lines",
461 [])
462
463test_lib("tests") {
464 public_include_dirs = [ "tests" ]
465 sources = tests_sources - [
466 rebase_path("tests/FontMgrAndroidParserTest.cpp"), # Android only
467 rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main
mtkleinb9796342016-08-03 19:19:48 -0700468 rebase_path("tests/RTConfRegistryTest.cpp"), # TODO: delete
mtklein4db3b792016-08-03 14:18:22 -0700469 rebase_path("tests/SkSLErrorTest.cpp"), # TODO: make work
470 rebase_path("tests/SkSLGLSLTest.cpp"), # TODO: make work
mtklein2f3416d2016-08-02 16:02:05 -0700471 rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile
472 rebase_path("tests/skia_test.cpp"), # alternate main
473 ]
474 deps = [
475 ":flags",
476 ":gpu_tool_utils",
477 ":skia",
478 ":tool_utils",
479 "//third_party/libpng",
480 "//third_party/zlib",
481 ]
482}
483
mtklein2b6870c2016-07-28 14:17:33 -0700484bench_sources = exec_script("gyp/find.py",
485 [
mtklein2b6870c2016-07-28 14:17:33 -0700486 "*.c*",
mtkleinada5a442016-08-02 14:28:26 -0700487 rebase_path("bench"),
mtklein2b6870c2016-07-28 14:17:33 -0700488 ],
489 "list lines",
490 [])
mtklein25c81d42016-07-27 13:55:26 -0700491
mtklein2b6870c2016-07-28 14:17:33 -0700492test_lib("bench") {
493 public_include_dirs = [ "bench" ]
494 sources = bench_sources
495 sources -= [
496 rebase_path("bench/nanobench.cpp"),
497 rebase_path("bench/nanobenchAndroid.cpp"),
498 ]
499 deps = [
500 ":flags",
501 ":gm",
502 ":gpu_tool_utils",
503 ":skia",
504 ":tool_utils",
505 ]
506}
507
fmalitaa2b9fdf2016-08-03 19:53:36 -0700508test_lib("experimental_svg_model") {
509 public_include_dirs = [ "experimental/svg/model" ]
510 sources = [
511 "experimental/svg/model/SkSVGAttribute.cpp",
512 "experimental/svg/model/SkSVGAttributeParser.cpp",
513 "experimental/svg/model/SkSVGContainer.cpp",
514 "experimental/svg/model/SkSVGDOM.cpp",
515 "experimental/svg/model/SkSVGNode.cpp",
516 "experimental/svg/model/SkSVGPath.cpp",
517 "experimental/svg/model/SkSVGRect.cpp",
518 "experimental/svg/model/SkSVGRenderContext.cpp",
519 "experimental/svg/model/SkSVGSVG.cpp",
520 "experimental/svg/model/SkSVGShape.cpp",
521 "experimental/svg/model/SkSVGTransformableNode.cpp",
522 "experimental/svg/model/SkSVGValue.cpp",
523 ]
524 deps = [
525 ":skia",
526 ]
527}
528
mtklein2b6870c2016-07-28 14:17:33 -0700529if (!is_component_build) { # Our test tools use many non-SK_API APIs...
530 executable("dm") {
531 sources = [
532 "dm/DM.cpp",
533 "dm/DMJsonWriter.cpp",
534 "dm/DMSrcSink.cpp",
mtklein2b6870c2016-07-28 14:17:33 -0700535 ]
536 include_dirs = [ "tests" ]
537 deps = [
fmalitaa2b9fdf2016-08-03 19:53:36 -0700538 ":experimental_svg_model",
mtklein2b6870c2016-07-28 14:17:33 -0700539 ":flags",
540 ":gm",
541 ":gpu_tool_utils",
542 ":skia",
mtklein2f3416d2016-08-02 16:02:05 -0700543 ":tests",
mtklein2b6870c2016-07-28 14:17:33 -0700544 ":tool_utils",
545 "//third_party/jsoncpp",
546 "//third_party/libpng",
547 ]
548 testonly = true
549 }
550
551 executable("monobench") {
552 sources = [
553 "tools/monobench.cpp",
554 ]
555 deps = [
556 ":bench",
557 ":skia",
558 ]
559 testonly = true
560 }
561
562 executable("nanobench") {
563 sources = [
564 "bench/nanobench.cpp",
565 ]
566 deps = [
567 ":bench",
568 ":flags",
569 ":gm",
570 ":gpu_tool_utils",
571 ":skia",
572 ":tool_utils",
573 "//third_party/jsoncpp",
574 ]
575 testonly = true
576 }
halcanary19a97202016-08-03 15:08:04 -0700577
578 executable("sktexttopdf") {
579 sources = [
580 "tools/SkShaper_harfbuzz.cpp",
581 "tools/using_skia_and_harfbuzz.cpp",
582 ]
583 deps = [
584 ":skia",
585 "//third_party/harfbuzz",
586 ]
587 testonly = true
588 }
mtklein25c81d42016-07-27 13:55:26 -0700589}