Loading opengl/libs/EGL/egl_angle_platform.cpp +4 −13 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ namespace angle { constexpr char kAngleEs2Lib[] = "libGLESv2_angle.so"; constexpr int kAngleDlFlags = RTLD_LOCAL | RTLD_NOW; static GetDisplayPlatformFunc angleGetDisplayPlatform = nullptr; Loading Loading @@ -115,8 +116,6 @@ bool initializeAnglePlatform(EGLDisplay dpy) { android_namespace_t* ns = android::GraphicsEnv::getInstance().getAngleNamespace(); void* so = nullptr; if (ns) { // Loading from an APK, so hard-code the suffix to "_angle". constexpr char kAngleEs2Lib[] = "libGLESv2_angle.so"; const android_dlextinfo dlextinfo = { .flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = ns, Loading @@ -130,19 +129,11 @@ bool initializeAnglePlatform(EGLDisplay dpy) { } } else { // If we are here, ANGLE is loaded as built-in gl driver in the sphal. // Get the specified ANGLE library filename suffix. std::string angleEs2LibSuffix = android::base::GetProperty("ro.hardware.egl", ""); if (angleEs2LibSuffix.empty()) { ALOGE("%s failed to get valid ANGLE library filename suffix!", __FUNCTION__); return false; } std::string angleEs2LibName = "libGLESv2_" + angleEs2LibSuffix + ".so"; so = android_load_sphal_library(angleEs2LibName.c_str(), kAngleDlFlags); so = android_load_sphal_library(kAngleEs2Lib, kAngleDlFlags); if (so) { ALOGD("dlopen (%s) success at %p", angleEs2LibName.c_str(), so); ALOGD("dlopen (%s) success at %p", kAngleEs2Lib, so); } else { ALOGE("%s failed to dlopen %s!", __FUNCTION__, angleEs2LibName.c_str()); ALOGE("%s failed to dlopen %s: %s!", __FUNCTION__, kAngleEs2Lib, dlerror()); return false; } } Loading Loading
opengl/libs/EGL/egl_angle_platform.cpp +4 −13 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ namespace angle { constexpr char kAngleEs2Lib[] = "libGLESv2_angle.so"; constexpr int kAngleDlFlags = RTLD_LOCAL | RTLD_NOW; static GetDisplayPlatformFunc angleGetDisplayPlatform = nullptr; Loading Loading @@ -115,8 +116,6 @@ bool initializeAnglePlatform(EGLDisplay dpy) { android_namespace_t* ns = android::GraphicsEnv::getInstance().getAngleNamespace(); void* so = nullptr; if (ns) { // Loading from an APK, so hard-code the suffix to "_angle". constexpr char kAngleEs2Lib[] = "libGLESv2_angle.so"; const android_dlextinfo dlextinfo = { .flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = ns, Loading @@ -130,19 +129,11 @@ bool initializeAnglePlatform(EGLDisplay dpy) { } } else { // If we are here, ANGLE is loaded as built-in gl driver in the sphal. // Get the specified ANGLE library filename suffix. std::string angleEs2LibSuffix = android::base::GetProperty("ro.hardware.egl", ""); if (angleEs2LibSuffix.empty()) { ALOGE("%s failed to get valid ANGLE library filename suffix!", __FUNCTION__); return false; } std::string angleEs2LibName = "libGLESv2_" + angleEs2LibSuffix + ".so"; so = android_load_sphal_library(angleEs2LibName.c_str(), kAngleDlFlags); so = android_load_sphal_library(kAngleEs2Lib, kAngleDlFlags); if (so) { ALOGD("dlopen (%s) success at %p", angleEs2LibName.c_str(), so); ALOGD("dlopen (%s) success at %p", kAngleEs2Lib, so); } else { ALOGE("%s failed to dlopen %s!", __FUNCTION__, angleEs2LibName.c_str()); ALOGE("%s failed to dlopen %s: %s!", __FUNCTION__, kAngleEs2Lib, dlerror()); return false; } } Loading