Allow per-app opt in to use system ANGLE.
Previously the per-app opt in only works for ANGLE apk, this patch refactors the logic to allow per-app opt in to work for system ANGLE. This patch checks whether system ANGLE is supported and if it presents, uses it if the ANGLE apk setup fails. With this patch, the per-app opt in will function this way: 1) When full ANGLE apk is installed Regardless of whether system ANGLE is present, the "angle" option will use ANGLE apk, the "native" option will switch to native GLES drivers specified by ro.hardware.egl, the "default" option will use whatever the default graphics driver is loaded. 2) When full ANGLE apk is not installed and system ANGLE is present The "angle" option will use system ANGLE, the "native" option will switch to native GLES drivers specified by ro.hardware.egl, the "default" option will use whatever the default graphics driver is loaded. 3) When full ANGLE apk is not installed and system ANGLE doesn't exist The per-app option will not function at all. To Properly load ANGLE, the namespace of system ANGLE should be inherited from sphal namespace so that search paths and libraries linkage are properly constructed. Minor: clean up unused and unnecessary variables. Bug: b/283858001 Test: test with camera Test: atest CtsAngleIntegrationHostTestCases Change-Id: I2c9d4e1747796d2b0ae58c4456b781b9940fbb26
Loading
Please register or sign in to comment