我正在做一个需要在嵌入式平台上移植android-7.0的项目。我知道移植的关键:实现特定的硬件驱动程序和相应的hal。在处理mali-400gpu时,我应该移植gpu驱动程序opengl-es-libs和ump(unified memory provider),但为了简单起见,我只想使用不需要真正gpu的软件渲染。
我在init.rc中设置了一些属性,迫使android加载libgles\u android.so:
setprop ro.kernel.qemu 1号
setprop ro.kernel.qemu.gles 0选项
它起作用了!但系统未能选择合适的eglconfig,并重新启动surfaceflinger。日志如下:

I/SurfaceFlinger( 1056): SurfaceFlinger is starting
I/SurfaceFlinger( 1056): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL  ( 1056): Emulator without GPU support detected. Fallback to software renderer.
D/libEGL  ( 1056): loaded /system/lib64/egl/libGLES_android.so
W/gralloc ( 1056): page flipping not supported (yres_virtual=1080, requested=2160)
I/gralloc ( 1056): using (fd=11)
I/gralloc ( 1056): id           = simple
I/gralloc ( 1056): xres         = 1920 px
I/gralloc ( 1056): yres         = 1080 px
I/gralloc ( 1056): xres_virtual = 1920 px
I/gralloc ( 1056): yres_virtual = 1080 px
I/gralloc ( 1056): bpp          = 32
I/gralloc ( 1056): r            = 16:8
I/gralloc ( 1056): g            =  8:8
I/gralloc ( 1056): b            =  0:8
I/gralloc ( 1056): width        = 305 mm (159.568100 dpi)
I/gralloc ( 1056): height       = 171 mm (159.895081 dpi)
I/gralloc ( 1056): refresh rate = 60.00 Hz
W/hwcomposer( 1056): hwcomposer module not found
W/SurfaceFlinger( 1056): no suitable EGLConfig found, trying a simpler query
E/SurfaceFlinger( 1056): no suitable EGLConfig found,giving up

hwcomposer模块似乎不是必须的。我的问题是:
使用软件渲染的方法是正确的?
为什么找不到合适的eglconfig?看来我无法控制选择的程序。
我该怎么做,才能基于一个真正的gpu打开硬件渲染?

最佳答案

android不再支持纯软件渲染;真正的gpu和opengl-es实现是一项硬性要求。

10-08 01:06