| 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/shared_sources.gni") | 6 import("gn/shared_sources.gni") |
| 7 | 7 |
| 8 declare_args() { | 8 declare_args() { |
| 9 skia_enable_tools = !is_fuchsia && !is_component_build | 9 skia_enable_tools = !is_fuchsia && !is_component_build |
| 10 | 10 |
| 11 skia_use_expat = true | 11 skia_use_expat = true |
| 12 skia_use_fontconfig = is_linux | 12 skia_use_fontconfig = is_linux |
| 13 skia_use_freetype = is_android || is_fuchsia || is_linux | 13 skia_use_freetype = is_android || is_fuchsia || is_linux |
| 14 skia_use_giflib = !is_fuchsia | 14 skia_use_giflib = !is_fuchsia |
| 15 skia_use_libjpeg_turbo = true | 15 skia_use_libjpeg_turbo = true |
| 16 skia_use_libpng = true | 16 skia_use_libpng = true |
| 17 skia_use_libwebp = !is_fuchsia | 17 skia_use_libwebp = !is_fuchsia |
| 18 skia_use_sfntly = !is_fuchsia | 18 skia_use_sfntly = !is_fuchsia |
| 19 skia_use_vulkan = false |
| 19 skia_use_zlib = true | 20 skia_use_zlib = true |
| 20 } | 21 } |
| 21 | 22 |
| 22 fontmgr_android_enabled = skia_use_expat && skia_use_freetype | 23 fontmgr_android_enabled = skia_use_expat && skia_use_freetype |
| 23 | 24 |
| 24 skia_public_includes = [ | 25 skia_public_includes = [ |
| 25 "include/android", | 26 "include/android", |
| 26 "include/c", | 27 "include/c", |
| 27 "include/codec", | 28 "include/codec", |
| 28 "include/config", | 29 "include/config", |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 all_dependent_configs = [ ":" + target_name + "_public" ] | 199 all_dependent_configs = [ ":" + target_name + "_public" ] |
| 199 configs += skia_library_configs | 200 configs += skia_library_configs |
| 200 } | 201 } |
| 201 } else { | 202 } else { |
| 202 source_set(target_name) { | 203 source_set(target_name) { |
| 203 forward_variables_from(invoker, | 204 forward_variables_from(invoker, |
| 204 "*", | 205 "*", |
| 205 [ | 206 [ |
| 206 "public_defines", | 207 "public_defines", |
| 207 "deps", | 208 "deps", |
| 209 "libs", |
| 208 "sources", | 210 "sources", |
| 209 "sources_when_disabled", | 211 "sources_when_disabled", |
| 210 ]) | 212 ]) |
| 211 if (defined(invoker.sources_when_disabled)) { | 213 if (defined(invoker.sources_when_disabled)) { |
| 212 sources = invoker.sources_when_disabled | 214 sources = invoker.sources_when_disabled |
| 213 } | 215 } |
| 214 configs += skia_library_configs | 216 configs += skia_library_configs |
| 215 } | 217 } |
| 216 } | 218 } |
| 217 } | 219 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 334 |
| 333 deps = [ | 335 deps = [ |
| 334 "//third_party/freetype2", | 336 "//third_party/freetype2", |
| 335 ] | 337 ] |
| 336 sources = [ | 338 sources = [ |
| 337 "src/ports/SkFontHost_FreeType.cpp", | 339 "src/ports/SkFontHost_FreeType.cpp", |
| 338 "src/ports/SkFontHost_FreeType_common.cpp", | 340 "src/ports/SkFontHost_FreeType_common.cpp", |
| 339 ] | 341 ] |
| 340 } | 342 } |
| 341 | 343 |
| 344 optional("vulkan") { |
| 345 enabled = skia_use_vulkan |
| 346 public_defines = [ "SK_VULKAN" ] |
| 347 libs = [ "vulkan" ] |
| 348 sources = skia_vk_sources |
| 349 } |
| 350 |
| 342 optional("webp") { | 351 optional("webp") { |
| 343 enabled = skia_use_libwebp | 352 enabled = skia_use_libwebp |
| 344 public_defines = [ "SK_HAS_WEBP_LIBRARY" ] | 353 public_defines = [ "SK_HAS_WEBP_LIBRARY" ] |
| 345 | 354 |
| 346 deps = [ | 355 deps = [ |
| 347 "//third_party/libwebp", | 356 "//third_party/libwebp", |
| 348 ] | 357 ] |
| 349 sources = [ | 358 sources = [ |
| 350 "src/codec/SkWebpAdapterCodec.cpp", | 359 "src/codec/SkWebpAdapterCodec.cpp", |
| 351 "src/codec/SkWebpCodec.cpp", | 360 "src/codec/SkWebpCodec.cpp", |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 ":gif", | 392 ":gif", |
| 384 ":jpeg", | 393 ":jpeg", |
| 385 ":none", | 394 ":none", |
| 386 ":pdf", | 395 ":pdf", |
| 387 ":png", | 396 ":png", |
| 388 ":sse2", | 397 ":sse2", |
| 389 ":sse41", | 398 ":sse41", |
| 390 ":sse42", | 399 ":sse42", |
| 391 ":ssse3", | 400 ":ssse3", |
| 392 ":typeface_freetype", | 401 ":typeface_freetype", |
| 402 ":vulkan", |
| 393 ":webp", | 403 ":webp", |
| 394 ":xml", | 404 ":xml", |
| 395 ] | 405 ] |
| 396 | 406 |
| 397 sources = [] | 407 sources = [] |
| 398 sources += skia_core_sources | 408 sources += skia_core_sources |
| 399 sources += skia_effects_sources | 409 sources += skia_effects_sources |
| 400 sources += skia_gpu_sources | 410 sources += skia_gpu_sources |
| 401 sources += skia_sksl_sources | 411 sources += skia_sksl_sources |
| 402 sources += skia_utils_sources | 412 sources += skia_utils_sources |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 ] | 604 ] |
| 595 libs = [] | 605 libs = [] |
| 596 | 606 |
| 597 if (is_android) { | 607 if (is_android) { |
| 598 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] | 608 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
| 599 } else if (is_linux) { | 609 } else if (is_linux) { |
| 600 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] | 610 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
| 601 } else if (is_mac) { | 611 } else if (is_mac) { |
| 602 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] | 612 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
| 603 } | 613 } |
| 614 |
| 615 if (skia_use_vulkan) { |
| 616 sources += [ "tools/gpu/vk/VkTestContext.cpp" ] |
| 617 } |
| 604 } | 618 } |
| 605 | 619 |
| 606 test_lib("flags") { | 620 test_lib("flags") { |
| 607 public_include_dirs = [ "tools/flags" ] | 621 public_include_dirs = [ "tools/flags" ] |
| 608 sources = [ | 622 sources = [ |
| 609 "tools/flags/SkCommandLineFlags.cpp", | 623 "tools/flags/SkCommandLineFlags.cpp", |
| 610 "tools/flags/SkCommonFlags.cpp", | 624 "tools/flags/SkCommonFlags.cpp", |
| 611 "tools/flags/SkCommonFlagsConfig.cpp", | 625 "tools/flags/SkCommonFlagsConfig.cpp", |
| 612 ] | 626 ] |
| 613 deps = [ | 627 deps = [ |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 sources = [ | 827 sources = [ |
| 814 "tools/SkShaper_primitive.cpp", | 828 "tools/SkShaper_primitive.cpp", |
| 815 "tools/using_skia_and_harfbuzz.cpp", | 829 "tools/using_skia_and_harfbuzz.cpp", |
| 816 ] | 830 ] |
| 817 deps = [ | 831 deps = [ |
| 818 ":skia", | 832 ":skia", |
| 819 ] | 833 ] |
| 820 testonly = true | 834 testonly = true |
| 821 } | 835 } |
| 822 } | 836 } |
| OLD | NEW |