summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/GraphicsEnv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
-rw-r--r--libs/graphicsenv/GraphicsEnv.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index 39b5829faf..f46e9f6c53 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -22,6 +22,7 @@
#include <log/log.h>
#include <nativeloader/dlext_namespaces.h>
+#include <nativeloader/native_loader.h>
// TODO(b/37049319) Get this from a header once one exists
extern "C" {
@@ -45,6 +46,32 @@ void GraphicsEnv::setDriverPath(const std::string path) {
mDriverPath = path;
}
+void GraphicsEnv::setLayerPaths(android_namespace_t* appNamespace, const std::string layerPaths) {
+ if (mLayerPaths.empty()) {
+ mLayerPaths = layerPaths;
+ mAppNamespace = appNamespace;
+ } else {
+ ALOGV("Vulkan layer search path already set, not clobbering with '%s' for namespace %p'",
+ layerPaths.c_str(), appNamespace);
+ }
+}
+
+android_namespace_t* GraphicsEnv::getAppNamespace() {
+ return mAppNamespace;
+}
+
+const std::string GraphicsEnv::getLayerPaths(){
+ return mLayerPaths;
+}
+
+const std::string GraphicsEnv::getDebugLayers() {
+ return mDebugLayers;
+}
+
+void GraphicsEnv::setDebugLayers(const std::string layers) {
+ mDebugLayers = layers;
+}
+
android_namespace_t* GraphicsEnv::getDriverNamespace() {
static std::once_flag once;
std::call_once(once, [this]() {