summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYiwei Zhang <zzyiwei@google.com>2020-02-18 10:45:15 -0800
committerYiwei Zhang <zzyiwei@google.com>2020-02-18 19:01:55 +0000
commit279df620b0175bbe5dfe34f73d75450d541792de (patch)
tree4768ccc5c9a58633e8c483ea58b53f02ee6bee01
parent162190933bb1456d48a41b0205f3864170691aa1 (diff)
downloadandroid_frameworks_native-279df620b0175bbe5dfe34f73d75450d541792de.tar.gz
android_frameworks_native-279df620b0175bbe5dfe34f73d75450d541792de.tar.bz2
android_frameworks_native-279df620b0175bbe5dfe34f73d75450d541792de.zip
libvulkan: remove a redundant check debuggable logic
There're below cases which we can load the debug layers: (1) Layer search paths added from Settings global Layers enabled from Settings global (2) Layer search paths added from default system debug path Layers enabled from system property (3) Layer search paths are from app class loader's default paths Layers enabled from system property For (1), we have done the debuggable check in Java land GraphicsEnvironment. For (2), we have a separate check debuggable logic for adding the system debug path to the layers search paths. For (3), we should never need to check debuggable. So we should just remove the redundant debuggable check when we add implicit layers, which can unblock (3) immediately as well as maintaining the security logic around debug layers. Bug: 147838267 Bug: 149183377 Test: CtsRootlessGpuDebugHostTest#testSystemPropertyEnableVulkan on userbuild Change-Id: I80d9cf3ff6786ce4d4ec5d8afb8da58ba0842ec9
-rw-r--r--vulkan/libvulkan/api.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/vulkan/libvulkan/api.cpp b/vulkan/libvulkan/api.cpp
index dd9efd3e1..c3b5523b9 100644
--- a/vulkan/libvulkan/api.cpp
+++ b/vulkan/libvulkan/api.cpp
@@ -124,8 +124,7 @@ class OverrideLayerNames {
};
void AddImplicitLayers() {
- if (!is_instance_ ||
- !android::GraphicsEnv::getInstance().isDebuggable())
+ if (!is_instance_)
return;
GetLayersFromSettings();