+62
−49
+85
−3
+1
−0
+3
−7
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Both ANGLE and Game Driver originally require the GL driver to be not loaded before the App launches. However, extra memory overhead from loading GL driver in each process requires us to enable gl driver preloading in Zygote again. So this CL adds the logic to unload the system driver if the App chooses to use ANGLE or Game Driver. As long as nobody is using GL api in Zygote to create any context, the unloading at App launch time should be safe. eglGetDisplay will always ask the driver for the display handle after this change, otherwise it will still use the cached display handle even we unload the system driver and load the ANGLE or Game Driver. This means we no longer cache it because eglGetDisplay is rarely called and trivial for the driver. Bug: 134526352 Test: build, flash and boot. Then manually test with ANGLE and Game Driver. Change-Id: I7c068ce9f630347a5d94823bbe6cfbac0f280e91