GN: enable Vulkan on Android when API >= 24.

Android API >= 24 implies Vulkan support, so we can have a more useful default here than 'false'.  If for some reason you wanted to turn it off, you can still override skia_use_vulkan.

The defined(ndk_api) guards other users of our GN files (Fuchsia) who may not have an ndk_api argument defined in their BUILDCONFIG.gn.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347843003

Review-Url: https://codereview.chromium.org/2347843003
This commit is contained in:
mtklein 2016-09-16 07:01:17 -07:00 committed by Commit bot
parent f93d71122e
commit f29180e65a
3 changed files with 2 additions and 3 deletions

View File

@ -16,7 +16,7 @@ declare_args() {
skia_use_libpng = true
skia_use_libwebp = !is_fuchsia
skia_use_sfntly = !is_fuchsia
skia_use_vulkan = false
skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24
skia_use_zlib = true
}

View File

@ -62,7 +62,6 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
if configuration != 'Debug':
args['is_debug'] = 'false'
if 'Vulkan' in extra_config:
args['skia_use_vulkan'] = 'true'
args['ndk_api'] = 24
gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems()))

View File

@ -134,7 +134,7 @@
"gn",
"gen",
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan/Release",
"--args=is_debug=false ndk=\"[SLAVE_BUILD]/android_ndk_linux\" ndk_api=24 skia_use_vulkan=true target_cpu=\"arm64\""
"--args=is_debug=false ndk=\"[SLAVE_BUILD]/android_ndk_linux\" ndk_api=24 target_cpu=\"arm64\""
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {