emulator: opengl: fallback gralloc module
This patch modifies the gralloc.goldfish module to check
that the emulator does, indeed, support GPU emulation.
If this is not the case, it loads the framebuffer-based fallback
module (gralloc.default) explicitely and uses it instead.
This is necessary because sometimes the emulator will be started
in headless mode in restricted environment, i.e. without access
to the display subsystem or GL libraries, which make GPU emulation
impossible.
We check for ro.kernel.qemu.gles which will be either undefined
or set to 0 if the emulator doesn't support GPU emulation, or 1
otherwise.
Change-Id: Ib6b143e6dcdfb44ff2c5b889138d0fb4118bb461
1 file changed