OLD | NEW |
---|---|
1 # Copyright 2016 Google Inc. | 1 # Copyright 2016 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import("gn/android_framework_defines.gni") | 6 import("gn/android_framework_defines.gni") |
7 import("gn/shared_sources.gni") | 7 import("gn/shared_sources.gni") |
8 | 8 |
9 if (!defined(is_skia_standalone)) { | 9 if (!defined(is_skia_standalone)) { |
10 is_skia_standalone = false | 10 is_skia_standalone = false |
11 } | 11 } |
12 | 12 |
13 declare_args() { | 13 declare_args() { |
14 skia_use_angle = false | 14 skia_use_angle = false |
15 skia_use_expat = true | 15 skia_use_expat = true |
16 skia_use_fontconfig = is_linux | 16 skia_use_fontconfig = is_linux |
17 skia_use_freetype = is_android || is_fuchsia || is_linux | 17 skia_use_freetype = is_android || is_fuchsia || is_linux |
18 skia_use_gdi = false | 18 skia_use_gdi = false |
19 skia_use_libjpeg_turbo = true | 19 skia_use_libjpeg_turbo = true |
20 skia_use_libpng = true | 20 skia_use_libpng = true |
21 skia_use_libwebp = !is_fuchsia | 21 skia_use_libwebp = !is_fuchsia |
22 skia_use_mesa = false | 22 skia_use_mesa = false |
23 skia_use_raw = !is_win | |
23 skia_use_sfntly = !is_fuchsia && !is_win # TODO: icu on Windows, re-enable th is. | 24 skia_use_sfntly = !is_fuchsia && !is_win # TODO: icu on Windows, re-enable th is. |
24 skia_use_zlib = true | 25 skia_use_zlib = true |
25 | 26 |
26 skia_enable_android_framework_defines = false | 27 skia_enable_android_framework_defines = false |
27 skia_enable_gpu = true | 28 skia_enable_gpu = true |
28 skia_enable_tools = is_skia_standalone | 29 skia_enable_tools = is_skia_standalone |
29 skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug | 30 skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug |
30 skia_vulkan_sdk = getenv("VULKAN_SDK") | 31 skia_vulkan_sdk = getenv("VULKAN_SDK") |
31 } | 32 } |
32 | 33 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 if (defined(invoker.public_defines)) { | 278 if (defined(invoker.public_defines)) { |
278 defines = invoker.public_defines | 279 defines = invoker.public_defines |
279 } | 280 } |
280 } | 281 } |
281 source_set(target_name) { | 282 source_set(target_name) { |
282 forward_variables_from(invoker, | 283 forward_variables_from(invoker, |
283 "*", | 284 "*", |
284 [ | 285 [ |
285 "public_defines", | 286 "public_defines", |
286 "sources_when_disabled", | 287 "sources_when_disabled", |
288 "configs_to_remove", | |
287 ]) | 289 ]) |
288 all_dependent_configs = [ ":" + target_name + "_public" ] | 290 all_dependent_configs = [ ":" + target_name + "_public" ] |
289 configs += skia_library_configs | 291 configs += skia_library_configs |
292 if (defined(invoker.configs_to_remove)) { | |
293 configs -= invoker.configs_to_remove | |
294 } | |
290 } | 295 } |
291 } else { | 296 } else { |
292 source_set(target_name) { | 297 source_set(target_name) { |
293 forward_variables_from(invoker, | 298 forward_variables_from(invoker, |
294 "*", | 299 "*", |
295 [ | 300 [ |
296 "public_defines", | 301 "public_defines", |
297 "deps", | 302 "deps", |
298 "libs", | 303 "libs", |
299 "sources", | 304 "sources", |
300 "sources_when_disabled", | 305 "sources_when_disabled", |
306 "configs_to_remove", | |
301 ]) | 307 ]) |
302 if (defined(invoker.sources_when_disabled)) { | 308 if (defined(invoker.sources_when_disabled)) { |
303 sources = invoker.sources_when_disabled | 309 sources = invoker.sources_when_disabled |
304 } | 310 } |
305 configs += skia_library_configs | 311 configs += skia_library_configs |
306 } | 312 } |
307 } | 313 } |
308 } | 314 } |
309 | 315 |
310 optional("fontmgr_android") { | 316 optional("fontmgr_android") { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
435 deps = [ | 441 deps = [ |
436 "//third_party/libpng", | 442 "//third_party/libpng", |
437 ] | 443 ] |
438 sources = [ | 444 sources = [ |
439 "src/codec/SkIcoCodec.cpp", | 445 "src/codec/SkIcoCodec.cpp", |
440 "src/codec/SkPngCodec.cpp", | 446 "src/codec/SkPngCodec.cpp", |
441 "src/images/SkPNGImageEncoder.cpp", | 447 "src/images/SkPNGImageEncoder.cpp", |
442 ] | 448 ] |
443 } | 449 } |
444 | 450 |
451 optional("raw") { | |
452 enabled = skia_use_raw && skia_use_libjpeg_turbo && skia_use_zlib | |
453 public_defines = [ "SK_CODEC_DECODES_RAW" ] | |
454 | |
455 deps = [ | |
456 "//third_party/dng_sdk", | |
457 "//third_party/libjpeg-turbo:libjpeg", | |
458 "//third_party/piex", | |
459 ] | |
460 | |
461 configs_to_remove = [ "//gn:no_exceptions" ] | |
mtklein_C
2016/10/31 14:38:03
Let's add a note why?
# SkRawCodec catches any ex
scroggo
2016/10/31 14:58:58
Done.
| |
462 | |
463 sources = [ | |
464 "src/codec/SkRawAdapterCodec.cpp", | |
465 "src/codec/SkRawCodec.cpp", | |
466 ] | |
467 } | |
468 | |
445 optional("typeface_freetype") { | 469 optional("typeface_freetype") { |
446 enabled = skia_use_freetype | 470 enabled = skia_use_freetype |
447 | 471 |
448 deps = [ | 472 deps = [ |
449 "//third_party/freetype2", | 473 "//third_party/freetype2", |
450 ] | 474 ] |
451 sources = [ | 475 sources = [ |
452 "src/ports/SkFontHost_FreeType.cpp", | 476 "src/ports/SkFontHost_FreeType.cpp", |
453 "src/ports/SkFontHost_FreeType_common.cpp", | 477 "src/ports/SkFontHost_FreeType_common.cpp", |
454 ] | 478 ] |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 ":fontmgr_android", | 518 ":fontmgr_android", |
495 ":fontmgr_custom", | 519 ":fontmgr_custom", |
496 ":fontmgr_fontconfig", | 520 ":fontmgr_fontconfig", |
497 ":fontmgr_fuchsia", | 521 ":fontmgr_fuchsia", |
498 ":gpu", | 522 ":gpu", |
499 ":hsw", | 523 ":hsw", |
500 ":jpeg", | 524 ":jpeg", |
501 ":none", | 525 ":none", |
502 ":pdf", | 526 ":pdf", |
503 ":png", | 527 ":png", |
528 ":raw", | |
504 ":sse2", | 529 ":sse2", |
505 ":sse41", | 530 ":sse41", |
506 ":sse42", | 531 ":sse42", |
507 ":ssse3", | 532 ":ssse3", |
508 ":typeface_freetype", | 533 ":typeface_freetype", |
509 ":webp", | 534 ":webp", |
510 ":xml", | 535 ":xml", |
511 ] | 536 ] |
512 | 537 |
513 sources = [] | 538 sources = [] |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1250 ] | 1275 ] |
1251 if (is_android) { | 1276 if (is_android) { |
1252 deps += [ "//third_party/native_app_glue" ] | 1277 deps += [ "//third_party/native_app_glue" ] |
1253 } else if (is_mac) { | 1278 } else if (is_mac) { |
1254 deps += [ "//third_party/libsdl" ] | 1279 deps += [ "//third_party/libsdl" ] |
1255 } | 1280 } |
1256 testonly = true | 1281 testonly = true |
1257 } | 1282 } |
1258 } | 1283 } |
1259 } | 1284 } |
OLD | NEW |