Loading libs/graphicsenv/GraphicsEnv.cpp +20 −14 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include <sys/prctl.h> #include <memory> #include <mutex> #include <string> #include <dlfcn.h> Loading Loading @@ -406,9 +405,16 @@ android_namespace_t* GraphicsEnv::getDriverNamespace() { } android_namespace_t* GraphicsEnv::getAngleNamespace() { static std::once_flag once; std::call_once(once, [this]() { if (mAnglePath.empty()) return; std::lock_guard<std::mutex> lock(mNamespaceMutex); if (mAngleNamespace) { return mAngleNamespace; } if (mAnglePath.empty()) { ALOGV("mAnglePath is empty, not creating ANGLE namespace"); return nullptr; } mAngleNamespace = android_create_namespace("ANGLE", nullptr, // ld_library_path Loading @@ -417,8 +423,8 @@ android_namespace_t* GraphicsEnv::getAngleNamespace() { ANDROID_NAMESPACE_TYPE_ISOLATED, nullptr, // permitted_when_isolated_path nullptr); if (!mAngleNamespace) ALOGD("Could not create ANGLE namespace from default"); }); ALOGD_IF(!mAngleNamespace, "Could not create ANGLE namespace from default"); return mAngleNamespace; } Loading libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef ANDROID_UI_GRAPHICS_ENV_H #define ANDROID_UI_GRAPHICS_ENV_H 1 #include <mutex> #include <string> #include <vector> Loading Loading @@ -77,6 +78,7 @@ private: std::string mDebugLayers; std::string mDebugLayersGLES; std::string mLayerPaths; std::mutex mNamespaceMutex; android_namespace_t* mDriverNamespace = nullptr; android_namespace_t* mAngleNamespace = nullptr; NativeLoaderNamespace* mAppNamespace = nullptr; Loading Loading
libs/graphicsenv/GraphicsEnv.cpp +20 −14 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include <sys/prctl.h> #include <memory> #include <mutex> #include <string> #include <dlfcn.h> Loading Loading @@ -406,9 +405,16 @@ android_namespace_t* GraphicsEnv::getDriverNamespace() { } android_namespace_t* GraphicsEnv::getAngleNamespace() { static std::once_flag once; std::call_once(once, [this]() { if (mAnglePath.empty()) return; std::lock_guard<std::mutex> lock(mNamespaceMutex); if (mAngleNamespace) { return mAngleNamespace; } if (mAnglePath.empty()) { ALOGV("mAnglePath is empty, not creating ANGLE namespace"); return nullptr; } mAngleNamespace = android_create_namespace("ANGLE", nullptr, // ld_library_path Loading @@ -417,8 +423,8 @@ android_namespace_t* GraphicsEnv::getAngleNamespace() { ANDROID_NAMESPACE_TYPE_ISOLATED, nullptr, // permitted_when_isolated_path nullptr); if (!mAngleNamespace) ALOGD("Could not create ANGLE namespace from default"); }); ALOGD_IF(!mAngleNamespace, "Could not create ANGLE namespace from default"); return mAngleNamespace; } Loading
libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef ANDROID_UI_GRAPHICS_ENV_H #define ANDROID_UI_GRAPHICS_ENV_H 1 #include <mutex> #include <string> #include <vector> Loading Loading @@ -77,6 +78,7 @@ private: std::string mDebugLayers; std::string mDebugLayersGLES; std::string mLayerPaths; std::mutex mNamespaceMutex; android_namespace_t* mDriverNamespace = nullptr; android_namespace_t* mAngleNamespace = nullptr; NativeLoaderNamespace* mAppNamespace = nullptr; Loading