2019-02-04 20:36:31 +00:00
|
|
|
# Copyright 2019 Google LLC.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2019-02-22 15:04:06 +00:00
|
|
|
if (!defined(is_skia_standalone)) {
|
|
|
|
is_skia_standalone = false
|
|
|
|
}
|
|
|
|
|
2019-09-25 21:14:35 +00:00
|
|
|
is_skia_dev_build = is_skia_standalone && !is_official_build
|
2019-09-04 14:05:33 +00:00
|
|
|
|
2019-02-04 20:36:31 +00:00
|
|
|
declare_args() {
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_android_serial = ""
|
2022-04-06 15:40:35 +00:00
|
|
|
skia_compile_modules = false
|
2022-03-30 21:26:33 +00:00
|
|
|
skia_compile_sksl_tests = false
|
2020-03-18 21:37:23 +00:00
|
|
|
skia_enable_api_available_macro = true
|
2020-04-24 17:00:48 +00:00
|
|
|
skia_enable_android_utils = is_skia_dev_build
|
2021-07-01 16:12:52 +00:00
|
|
|
skia_enable_skgpu_v1 = true
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_enable_discrete_gpu = true
|
|
|
|
skia_enable_flutter_defines = false
|
|
|
|
skia_enable_fontmgr_empty = false
|
|
|
|
skia_enable_fontmgr_fuchsia = is_fuchsia
|
|
|
|
skia_enable_fontmgr_win = is_win
|
2019-02-22 15:04:06 +00:00
|
|
|
skia_enable_gpu = true
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_enable_pdf = !is_wasm
|
|
|
|
skia_enable_skottie = !(is_win && is_component_build) ||
|
|
|
|
(is_wasm && skia_canvaskit_enable_skottie)
|
2021-07-12 21:02:21 +00:00
|
|
|
skia_enable_sksl = true
|
2022-04-12 12:23:07 +00:00
|
|
|
skia_enable_sksl_tracing = is_skia_dev_build
|
2020-08-14 12:36:54 +00:00
|
|
|
skia_enable_skvm_jit_when_possible = is_skia_dev_build
|
2021-03-18 17:48:52 +00:00
|
|
|
skia_enable_svg = !is_component_build
|
2019-02-22 15:04:06 +00:00
|
|
|
skia_enable_tools = is_skia_dev_build
|
2020-02-24 16:36:15 +00:00
|
|
|
skia_enable_gpu_debug_layers = is_skia_dev_build && is_debug
|
2021-11-12 00:33:48 +00:00
|
|
|
skia_disable_vma_stl_shared_mutex = false
|
2021-02-09 14:22:41 +00:00
|
|
|
skia_enable_winuwp = false
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_generate_workarounds = false
|
|
|
|
skia_include_multiframe_procs = false
|
|
|
|
skia_lex = false
|
2019-11-20 21:01:31 +00:00
|
|
|
skia_libgifcodec_path = "third_party/externals/libgifcodec"
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_tools_require_resources = false
|
2019-09-25 21:14:35 +00:00
|
|
|
skia_update_fuchsia_sdk = false
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_angle = false
|
|
|
|
skia_use_dawn = false
|
2020-02-18 19:34:38 +00:00
|
|
|
skia_use_direct3d = false
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_egl = false
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_use_expat = !is_wasm
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_ffmpeg = false
|
|
|
|
skia_use_fixed_gamma_text = is_android
|
|
|
|
skia_use_fontconfig = is_linux
|
2020-06-04 03:29:43 +00:00
|
|
|
skia_use_fonthost_mac = is_mac || is_ios
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_use_freetype = is_android || is_fuchsia || is_linux || is_wasm
|
2019-02-22 20:55:39 +00:00
|
|
|
skia_use_harfbuzz = true
|
2019-11-08 21:18:15 +00:00
|
|
|
skia_use_gl = !is_fuchsia
|
2020-03-09 13:59:56 +00:00
|
|
|
skia_use_icu = !is_fuchsia
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_libheif = is_skia_dev_build
|
2020-03-09 18:23:30 +00:00
|
|
|
skia_use_libjpeg_turbo_decode = true
|
|
|
|
skia_use_libjpeg_turbo_encode = true
|
2022-02-02 13:45:33 +00:00
|
|
|
skia_use_libjxl_decode = false
|
2020-03-09 18:23:30 +00:00
|
|
|
skia_use_libpng_decode = true
|
|
|
|
skia_use_libpng_encode = true
|
|
|
|
skia_use_libwebp_decode = true
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_use_libwebp_encode = !is_wasm
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_lua = is_skia_dev_build && !is_ios
|
|
|
|
skia_use_metal = false
|
2020-08-05 20:51:10 +00:00
|
|
|
skia_use_ndk_images = is_android && defined(ndk_api) && ndk_api >= 30
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_use_piex = !is_win && !is_wasm
|
2020-08-13 18:12:10 +00:00
|
|
|
skia_use_sfml = false
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_use_webgl = is_wasm
|
|
|
|
skia_use_wuffs = is_wasm
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_x11 = is_linux
|
|
|
|
skia_use_xps = true
|
2021-09-21 15:59:57 +00:00
|
|
|
skia_enable_graphite = false
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_zlib = true
|
|
|
|
|
2020-07-10 17:56:07 +00:00
|
|
|
skia_vtune_path = ""
|
|
|
|
|
2019-09-03 17:46:25 +00:00
|
|
|
if (is_ios) {
|
|
|
|
skia_ios_identity = ".*Google.*"
|
|
|
|
skia_ios_profile = "Google Development"
|
|
|
|
}
|
Reland "Reland "Adding a trace to nanobench for RP/VM comparison""
This reverts commit 0e48516aae7e63dc50f16e9fb0080039f4f06d88.
Reason for revert: Again trying to land this CL
Original change's description:
> Revert "Reland "Adding a trace to nanobench for RP/VM comparison""
>
> This reverts commit 94b8dd67108d105f13d0fcd60e8c427e92355a64.
>
> Reason for revert: https://ci.chromium.org/p/chromium/builders/try/android-marshmallow-x86-rel appears to either not support this instruction or it is disabled.
>
> Original change's description:
> > Reland "Adding a trace to nanobench for RP/VM comparison"
> >
> > This reverts commit 39728eb9804cced26933f38d6bcf5652dd8d24bc.
> >
> > Reason for revert: Need to reland after I figure out what happened
> >
> > Original change's description:
> > > Revert "Adding a trace to nanobench for RP/VM comparison"
> > >
> > > This reverts commit e855b1273fee6a2b3505ea27aec56e8fc82749e3.
> > >
> > > Reason for revert: breaking the tree
> > >
> > > Original change's description:
> > > > Adding a trace to nanobench for RP/VM comparison
> > > >
> > > > Run nanobench with --compare key and collect data for comparison:
> > > > ./out/Release/nanobench --csv --config 8888 --skvm --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
> > > > ./out/Release/nanobench --csv --config 8888 --forceRasterPipeline --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee RP.data
> > > > awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0 {vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10; vmvminterp[$3] = $11; vmrpcycle[$3] = $14; vmrpscan[$3] = $16; vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1 {print $3, vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8, $10, $11, $14, $16, $18} ENDFILE {fileNum += 1}' VM.data RP.data > compare.csv
> > > >
> > > > You can see an example of comparison table here:
> > > > https://docs.google.com/spreadsheets/d/1Q57oz6Jn8JPQkPzUbtO0fcZh2VhwPhxwsLaHnSb9uR0/edit#gid=406063636
> > > >
> > > > Change-Id: I8fa35e3fb087bce00ab19355a3bc021334aa7a80
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501337
> > > > Reviewed-by: Herb Derby <herb@google.com>
> > > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> > >
> > > Change-Id: I6799b90ffd8bc05c65d1185bfc07a06af05e2038
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507182
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> >
> > Change-Id: I3668b5a40f310598e23c922b1eb6f93db4dac13c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507183
> > Reviewed-by: Herb Derby <herb@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: I5d0174fca1aeaa0f3e75a8e1f643265701068f42
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508396
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: Ibf7c8957427dc8a1cdc133774608b48ab6715c7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508536
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-14 14:20:50 +00:00
|
|
|
|
|
|
|
skia_compare_vm_vs_rp = false
|
2022-02-14 20:08:12 +00:00
|
|
|
}
|
2019-09-03 17:46:25 +00:00
|
|
|
|
2022-02-14 20:08:12 +00:00
|
|
|
declare_args() {
|
2019-09-03 17:46:25 +00:00
|
|
|
if (is_mac) {
|
|
|
|
skia_gl_standard = "gl"
|
|
|
|
} else if (is_ios) {
|
|
|
|
skia_gl_standard = "gles"
|
2022-02-14 20:08:12 +00:00
|
|
|
} else if (is_wasm && skia_enable_gpu) {
|
|
|
|
skia_gl_standard = "webgl"
|
2019-09-03 17:46:25 +00:00
|
|
|
} else {
|
|
|
|
skia_gl_standard = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
|
|
|
|
} else if (is_fuchsia) {
|
2019-09-25 21:14:35 +00:00
|
|
|
skia_use_vulkan = true
|
2019-09-03 17:46:25 +00:00
|
|
|
} else {
|
2020-03-19 19:54:28 +00:00
|
|
|
skia_use_vulkan = false
|
2019-09-03 17:46:25 +00:00
|
|
|
}
|
2020-09-15 14:05:41 +00:00
|
|
|
|
2020-09-15 16:01:45 +00:00
|
|
|
skia_build_fuzzers = is_clang && is_linux && target_cpu == "x64"
|
2020-09-15 14:05:41 +00:00
|
|
|
skia_use_libfuzzer_defaults = true
|
2019-02-04 20:36:31 +00:00
|
|
|
}
|
2019-09-03 17:46:25 +00:00
|
|
|
|
2021-08-03 23:25:09 +00:00
|
|
|
declare_args() {
|
|
|
|
skia_pdf_subset_harfbuzz = skia_use_harfbuzz
|
|
|
|
}
|
|
|
|
|
2019-02-20 16:25:45 +00:00
|
|
|
declare_args() {
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_enable_fontmgr_custom_directory =
|
|
|
|
skia_use_freetype && !is_fuchsia && !is_wasm
|
2020-06-03 17:20:37 +00:00
|
|
|
skia_enable_fontmgr_custom_embedded = skia_use_freetype && !is_fuchsia
|
2022-02-14 20:08:12 +00:00
|
|
|
skia_enable_fontmgr_custom_empty = skia_use_freetype && !is_wasm
|
2020-06-03 17:20:37 +00:00
|
|
|
skia_enable_fontmgr_fontconfig = skia_use_freetype && skia_use_fontconfig
|
2021-02-09 14:22:41 +00:00
|
|
|
skia_enable_fontmgr_win_gdi = is_win && !skia_enable_winuwp
|
2020-06-03 17:20:37 +00:00
|
|
|
skia_enable_fontmgr_FontConfigInterface =
|
|
|
|
skia_use_freetype && skia_use_fontconfig
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_enable_spirv_validation = is_skia_dev_build && is_debug && !skia_use_dawn
|
2020-03-09 18:23:30 +00:00
|
|
|
skia_use_dng_sdk =
|
2022-02-14 20:08:12 +00:00
|
|
|
!is_fuchsia && !is_wasm && skia_use_libjpeg_turbo_decode && skia_use_zlib
|
2019-11-20 21:01:31 +00:00
|
|
|
skia_use_libgifcodec = !skia_use_wuffs
|
2019-09-03 17:46:25 +00:00
|
|
|
skia_use_sfntly = skia_use_icu
|
2020-02-24 16:36:15 +00:00
|
|
|
skia_enable_vulkan_debug_layers = skia_enable_gpu_debug_layers
|
|
|
|
skia_enable_direct3d_debug_layer = skia_enable_gpu_debug_layers
|
2021-07-07 16:02:10 +00:00
|
|
|
skia_enable_metal_debug_info = skia_enable_gpu_debug_layers
|
2020-04-27 14:26:21 +00:00
|
|
|
skia_use_vma = skia_use_vulkan
|
2022-04-07 19:16:14 +00:00
|
|
|
skia_build_for_debugger = false
|
2019-02-20 16:25:45 +00:00
|
|
|
}
|
2019-02-22 15:04:06 +00:00
|
|
|
|
2020-06-03 17:20:37 +00:00
|
|
|
declare_args() {
|
|
|
|
# skia_fontmgr_factory should define SkFontMgr::Factory()
|
|
|
|
if (skia_enable_fontmgr_empty) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_empty_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
} else if (is_android && skia_enable_fontmgr_android) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_android_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
} else if (is_win && skia_enable_fontmgr_win) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_win_factory"
|
2020-06-17 21:10:52 +00:00
|
|
|
} else if ((is_mac || is_ios) && skia_use_fonthost_mac) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_mac_ct_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
} else if (skia_enable_fontmgr_fontconfig) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_fontconfig_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
} else if (skia_enable_fontmgr_custom_directory) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_custom_directory_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
} else if (skia_enable_fontmgr_custom_embedded) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_custom_embedded_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
} else if (skia_enable_fontmgr_custom_empty) {
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_custom_empty_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
} else {
|
|
|
|
#"src/ports/SkFontMgr_FontConfigInterface_factory.cpp" #WontFix
|
|
|
|
#"src/ports/SkFontMgr_win_gdi_factory.cpp" # WontFix
|
2020-06-29 15:59:10 +00:00
|
|
|
skia_fontmgr_factory = ":fontmgr_empty_factory"
|
2020-06-03 17:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-22 15:04:06 +00:00
|
|
|
# Our tools require static linking (they use non-exported symbols), and the GPU backend.
|
|
|
|
skia_enable_tools = skia_enable_tools && !is_component_build && skia_enable_gpu
|
2021-03-16 18:29:20 +00:00
|
|
|
|
2021-07-12 21:02:21 +00:00
|
|
|
# The GPU build requires SkSL
|
|
|
|
skia_enable_sksl = skia_enable_sksl || skia_enable_gpu
|
|
|
|
|
2021-03-16 18:29:20 +00:00
|
|
|
# Skia's targets may be built inside other gn build systems.
|
|
|
|
# Skia builds other project's build targets inside its build.
|
|
|
|
# This is easier if the built-in target types remain generic.
|
|
|
|
# Place Skia target specific configs in skia_target_default_configs.
|
|
|
|
# These will be applied by the 'skia_*' templates.
|
|
|
|
# In the Skia build these configs apply many warnings as errors.
|
|
|
|
# Other projects may optionally set these configs as they see fit.
|
|
|
|
template("skia_target") {
|
|
|
|
target(invoker._skia_target_type, target_name) {
|
|
|
|
# set_defaults(invoker._skia_target_type) might not exist or set configs
|
|
|
|
if (!defined(configs)) {
|
|
|
|
configs = []
|
|
|
|
}
|
|
|
|
|
|
|
|
# Explicit configs instead of set_defaults("skia_target")
|
|
|
|
# Allows template("skia_*") below to avoid the configs dance.
|
|
|
|
if (defined(skia_target_default_configs)) {
|
|
|
|
configs += skia_target_default_configs
|
|
|
|
}
|
|
|
|
|
|
|
|
# "*" clobbers the current scope; append to existing configs
|
|
|
|
forward_variables_from(invoker, "*", [ "configs" ])
|
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template("skia_executable") {
|
|
|
|
skia_target(target_name) {
|
|
|
|
assert(!defined(configs), "No set_defaults(skia_target)")
|
|
|
|
_skia_target_type = "executable"
|
|
|
|
forward_variables_from(invoker, "*")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
template("skia_source_set") {
|
|
|
|
skia_target(target_name) {
|
|
|
|
assert(!defined(configs), "No set_defaults(skia_target)")
|
|
|
|
_skia_target_type = "source_set"
|
|
|
|
forward_variables_from(invoker, "*")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
template("skia_static_library") {
|
|
|
|
skia_target(target_name) {
|
|
|
|
assert(!defined(configs), "No set_defaults(skia_target)")
|
|
|
|
_skia_target_type = "static_library"
|
|
|
|
forward_variables_from(invoker, "*")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
template("skia_shared_library") {
|
|
|
|
skia_target(target_name) {
|
|
|
|
assert(!defined(configs), "No set_defaults(skia_target)")
|
|
|
|
_skia_target_type = "shared_library"
|
|
|
|
forward_variables_from(invoker, "*")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
template("skia_component") {
|
|
|
|
skia_target(target_name) {
|
|
|
|
assert(!defined(configs), "No set_defaults(skia_target)")
|
|
|
|
_skia_target_type = "component"
|
|
|
|
forward_variables_from(invoker, "*")
|
|
|
|
}
|
|
|
|
}
|