From e4a9bd79c676346ada8f4c35fa3a7fd99dfc5544 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Wed, 21 Sep 2016 07:36:14 -0700 Subject: [PATCH] Add define of SK_ENABLE_VK_LAYERS to gn build BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357953002 Review-Url: https://codereview.chromium.org/2357953002 --- BUILD.gn | 6 ++++++ infra/bots/recipe_modules/flavor/gn_android_flavor.py | 1 + .../Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan.json | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 4e78a1c..dddf118 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -21,6 +21,9 @@ declare_args() { skia_enable_android_framework_defines = false skia_enable_gpu = true skia_enable_tools = !is_fuchsia + + # TODO: Vulkan debug layers should be disabled for all client uses of skia as well. + skia_enable_vulkan_debug_layers = !is_fuchsia && is_debug } # Our tools require static linking (they use non-exported symbols) and GPU support (just lazy). @@ -328,6 +331,9 @@ optional("gpu") { public_defines += [ "SK_VULKAN" ] sources += skia_vk_sources libs += [ "vulkan" ] + if (skia_enable_vulkan_debug_layers) { + public_defines += [ "SK_ENABLE_VK_LAYERS" ] + } } } diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py index a375f3c..d9a8121 100644 --- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -63,6 +63,7 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): args['is_debug'] = 'false' if 'Vulkan' in extra_config: args['ndk_api'] = 24 + args['skia_enable_vulkan_debug_layers'] = 'false' if 'FrameworkDefs' in extra_config: args['skia_enable_android_framework_defines'] = 'true' 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 8e704bf..bbe07cc 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 target_cpu=\"arm64\"" + "--args=is_debug=false ndk=\"[SLAVE_BUILD]/android_ndk_linux\" ndk_api=24 skia_enable_vulkan_debug_layers=false target_cpu=\"arm64\"" ], "cwd": "[CUSTOM_/_B_WORK]/skia", "env": { -- 2.7.4