From: mtklein Date: Fri, 16 Sep 2016 14:01:17 +0000 (-0700) Subject: GN: enable Vulkan on Android when API >= 24. X-Git-Tag: submit/tizen/20180928.044319~106^2~371 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f29180e65afdd3bd5ff3c1a2f8d456f9aea125ed;p=platform%2Fupstream%2FlibSkiaSharp.git 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 --- diff --git a/BUILD.gn b/BUILD.gn index 46d443474f..d67c8cdfbe 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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 } diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py index 80952e8c8e..453049a474 100644 --- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -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())) diff --git a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json index c1eec7d9d4..8e704bf956 100644 --- a/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json +++ b/infra/bots/recipes/swarm_compile.expected/Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json @@ -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": {