diff options
| author | 2024-03-14 22:35:55 +0000 | |
|---|---|---|
| committer | 2024-03-14 22:35:55 +0000 | |
| commit | 56bc31666d52c20399031893e0431ac7b366f706 (patch) | |
| tree | caa0f502486625eca00333d61ddb663046e0e621 | |
| parent | 434e002dfb0ef5c911c0d6088255d3f1e9d485e0 (diff) | |
| parent | 342f92247253c3ee5daf19715c6729b25a00141b (diff) | |
Merge "Clean up ANGLE on system assumption." into main am: 342f922472
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2995540
Change-Id: I90f578680d19200cc00417c1176c0f046b686c3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | opengl/libs/EGL/Loader.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp index e487cbc54d..af0bcffc1f 100644 --- a/opengl/libs/EGL/Loader.cpp +++ b/opengl/libs/EGL/Loader.cpp @@ -67,7 +67,6 @@ static const char* PERSIST_DRIVER_SUFFIX_PROPERTY = "persist.graphics.egl"; static const char* RO_DRIVER_SUFFIX_PROPERTY = "ro.hardware.egl"; static const char* RO_BOARD_PLATFORM_PROPERTY = "ro.board.platform"; static const char* ANGLE_SUFFIX_VALUE = "angle"; -static const char* VENDOR_ANGLE_BUILD = "ro.gfx.angle.supported"; static const char* HAL_SUBNAME_KEY_PROPERTIES[3] = { PERSIST_DRIVER_SUFFIX_PROPERTY, @@ -494,14 +493,9 @@ static void* load_system_driver(const char* kind, const char* suffix, const bool void* dso = nullptr; - const bool AngleInVendor = property_get_bool(VENDOR_ANGLE_BUILD, false); const bool isSuffixAngle = suffix != nullptr && strcmp(suffix, ANGLE_SUFFIX_VALUE) == 0; - // Only use sphal namespace when system ANGLE binaries are not the default drivers. - const bool useSphalNamespace = !isSuffixAngle || AngleInVendor; - const std::string absolutePath = - findLibrary(libraryName, useSphalNamespace ? VENDOR_LIB_EGL_DIR : SYSTEM_LIB_PATH, - exact); + findLibrary(libraryName, isSuffixAngle ? SYSTEM_LIB_PATH : VENDOR_LIB_EGL_DIR, exact); if (absolutePath.empty()) { // this happens often, we don't want to log an error return nullptr; @@ -509,8 +503,9 @@ static void* load_system_driver(const char* kind, const char* suffix, const bool const char* const driverAbsolutePath = absolutePath.c_str(); // Currently the default driver is unlikely to be ANGLE on most devices, - // hence put this first. - if (useSphalNamespace) { + // hence put this first. Only use sphal namespace when system ANGLE binaries + // are not the default drivers. + if (!isSuffixAngle) { // Try to load drivers from the 'sphal' namespace, if it exist. Fall back to // the original routine when the namespace does not exist. // See /system/linkerconfig/contents/namespace for the configuration of the |