Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5e21eb35 authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

GL: unload system driver if needed

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
parent 0683fe79
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment