summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author Yiwei Zhang <zzyiwei@google.com> 2019-06-05 00:26:03 -0700
committer Yiwei Zhang <zzyiwei@google.com> 2019-06-06 12:47:50 -0700
commit5e21eb3591534febb178572b149f6d5ccf6b1337 (patch)
tree14addf2f7a14b6b4b5c47ccf984462d14e5b8fbf /libs/gui/SurfaceControl.cpp
parent0683fe791e810d576584fab816f99eac51f9cff7 (diff)
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
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
0 files changed, 0 insertions, 0 deletions