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 # SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of |
| 462 # Skia. |
| 463 configs_to_remove = [ "//gn:no_exceptions" ] |
| 464 |
| 465 sources = [ |
| 466 "src/codec/SkRawAdapterCodec.cpp", |
| 467 "src/codec/SkRawCodec.cpp", |
| 468 ] |
| 469 } |
| 470 |
445 optional("typeface_freetype") { | 471 optional("typeface_freetype") { |
446 enabled = skia_use_freetype | 472 enabled = skia_use_freetype |
447 | 473 |
448 deps = [ | 474 deps = [ |
449 "//third_party/freetype2", | 475 "//third_party/freetype2", |
450 ] | 476 ] |
451 sources = [ | 477 sources = [ |
452 "src/ports/SkFontHost_FreeType.cpp", | 478 "src/ports/SkFontHost_FreeType.cpp", |
453 "src/ports/SkFontHost_FreeType_common.cpp", | 479 "src/ports/SkFontHost_FreeType_common.cpp", |
454 ] | 480 ] |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 ":fontmgr_android", | 520 ":fontmgr_android", |
495 ":fontmgr_custom", | 521 ":fontmgr_custom", |
496 ":fontmgr_fontconfig", | 522 ":fontmgr_fontconfig", |
497 ":fontmgr_fuchsia", | 523 ":fontmgr_fuchsia", |
498 ":gpu", | 524 ":gpu", |
499 ":hsw", | 525 ":hsw", |
500 ":jpeg", | 526 ":jpeg", |
501 ":none", | 527 ":none", |
502 ":pdf", | 528 ":pdf", |
503 ":png", | 529 ":png", |
| 530 ":raw", |
504 ":sse2", | 531 ":sse2", |
505 ":sse41", | 532 ":sse41", |
506 ":sse42", | 533 ":sse42", |
507 ":ssse3", | 534 ":ssse3", |
508 ":typeface_freetype", | 535 ":typeface_freetype", |
509 ":webp", | 536 ":webp", |
510 ":xml", | 537 ":xml", |
511 ] | 538 ] |
512 | 539 |
513 sources = [] | 540 sources = [] |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 ] | 1277 ] |
1251 if (is_android) { | 1278 if (is_android) { |
1252 deps += [ "//third_party/native_app_glue" ] | 1279 deps += [ "//third_party/native_app_glue" ] |
1253 } else if (is_mac) { | 1280 } else if (is_mac) { |
1254 deps += [ "//third_party/libsdl" ] | 1281 deps += [ "//third_party/libsdl" ] |
1255 } | 1282 } |
1256 testonly = true | 1283 testonly = true |
1257 } | 1284 } |
1258 } | 1285 } |
1259 } | 1286 } |
OLD | NEW |