diff options
| author | 2023-11-03 18:08:19 +0000 | |
|---|---|---|
| committer | 2023-11-03 18:08:19 +0000 | |
| commit | 1c59b6b3c41a0dea3d33cf237bb4b9451fbd4536 (patch) | |
| tree | dd491c5ef173ad62512883b16757006ad19a7ad2 | |
| parent | eaf5d4af5e8901b07f642b1e8d055380307c19db (diff) | |
| parent | f24976564075d7ff62c97c1c76f70980121d824e (diff) | |
Merge "Do not use default namespace to load ANGLE when in vendor partition." into main am: 1d1f7ac538 am: f249765640
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2815885
Change-Id: Ibdd814bfbed199ea4348e31f139d9f740e00028b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | opengl/libs/EGL/Loader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp index e0ad6d9d9d..0e685bc15b 100644 --- a/opengl/libs/EGL/Loader.cpp +++ b/opengl/libs/EGL/Loader.cpp @@ -67,6 +67,7 @@ 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, @@ -493,8 +494,10 @@ 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 = suffix != nullptr && strcmp(suffix, ANGLE_SUFFIX_VALUE) != 0; + const bool useSphalNamespace = !isSuffixAngle || AngleInVendor; const std::string absolutePath = findLibrary(libraryName, useSphalNamespace ? VENDOR_LIB_EGL_DIR : SYSTEM_LIB_PATH, |