diff options
author | 2016-06-29 07:39:01 +0000 | |
---|---|---|
committer | 2016-06-29 07:39:03 +0000 | |
commit | bbadc5d313f99f3c02d282cbf12103c8c9364580 (patch) | |
tree | 17f2d62d30106ab1d8d13ca736804d3d8ad62b47 | |
parent | 5e055187bea4f4c96799a3e7fcc5aaaf57740ea3 (diff) | |
parent | 15e74c9614888d5b6acabc620e42d4e9e09cd5b1 (diff) |
Merge "Use the first Vulkan layer path" into nyc-mr1-dev
-rw-r--r-- | core/jni/android_app_ApplicationLoaders.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/jni/android_app_ApplicationLoaders.cpp b/core/jni/android_app_ApplicationLoaders.cpp index 24ee9591fc2f..3e7c039e2129 100644 --- a/core/jni/android_app_ApplicationLoaders.cpp +++ b/core/jni/android_app_ApplicationLoaders.cpp @@ -14,6 +14,8 @@ * limitations under the License. */ +#define LOG_TAG "ApplicationLoaders" + #include <nativehelper/ScopedUtfChars.h> #include <nativeloader/native_loader.h> #include <vulkan/vulkan_loader_data.h> @@ -22,10 +24,17 @@ static void setupVulkanLayerPath_native(JNIEnv* env, jobject clazz, jobject classLoader, jstring librarySearchPath) { + android_namespace_t* ns = android::FindNamespaceByClassLoader(env, classLoader); ScopedUtfChars layerPathChars(env, librarySearchPath); + vulkan::LoaderData& loader_data = vulkan::LoaderData::GetInstance(); - loader_data.layer_path = layerPathChars.c_str(); - loader_data.app_namespace = android::FindNamespaceByClassLoader(env, classLoader); + if (loader_data.layer_path.empty()) { + loader_data.layer_path = layerPathChars.c_str(); + loader_data.app_namespace = ns; + } else { + ALOGD("ignored Vulkan layer search path %s for namespace %p", + layerPathChars.c_str(), ns); + } } static const JNINativeMethod g_methods[] = { |