diff options
| author | 2023-11-03 17:38:56 +0000 | |
|---|---|---|
| committer | 2023-11-03 17:38:56 +0000 | |
| commit | 121dd859744b04912d9767767c7267b9dde3c29e (patch) | |
| tree | fc389e78640a6cd86126c8249ec2cbca8d190cbb | |
| parent | 5d3b685a8c03a75cd031fe34096ea0fd108d3494 (diff) | |
| parent | 1d1f7ac538473bc368a5358c9fb9f4d8c25ad142 (diff) | |
Merge "Do not use default namespace to load ANGLE when in vendor partition." into main am: 1d1f7ac538
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2815885
Change-Id: I8faa993c1c901d18dd52e7a7169f7f646edd906f
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, |