博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android Graphic Stacks
阅读量:4222 次
发布时间:2019-05-26

本文共 4670 字,大约阅读时间需要 15 分钟。

Graphics are a big topic in the Android platform, containing java/jni graphic framework and 2d/3d graphic engines (skia, OpenGL-ES, renderscript).

This document describes the general Android graphic stack and UI features on Freescale devices.

 

1. Android Graphic Stacks

  • All Android 3D apps and games have the following graphic stack:

  • Android system UI and all Apps UI follow 2D graphic stack as below, the hardware render will accelerate Android 2D UI with GPU HW OpenGL-ES 2.0 to improve the whole UI performance.

Hardware acceleration can be disabled on i.mx6 in device/fsl/imx6/soc/imx6dq.mk

USE_OPENGL_RENDERER := false

Then rebuild frameworks/base/core/jni, and replace libandroid_runtime.so

  • Surfaceflinger is responsible of all surface layers composition, and  then generate the framebuffer pixmap for display devices. these graphic surface layers are from 2D/3D apps.

  • Hwcomposer is the alternative module of Surfaceflinger with OpenGL-ES. Hwcomposer is used to combine the specific surface layers supported by specific vendor devices. Freescale i.MX6 devices use GPU 2D to combine most surface layers, and the system power can be reduced with GPU 2D instead of GPU 3D. The typical power saving case is video playback.

 

Hwcomposer with GPU 2D can offload GPU 3D task when running game and benchmarks, it is proved to improve the overall system performance about 20%.

2. Performance measurment

  • Show FPS for Android system performance

 

For NFS boot you can set “debug.sf.showfps” to 1 in init.freescale.rc (“setprop debug.sf.showfps 1”) and then reboot the system. For SD or EMMC boot, you can issue command “setprop debug.sf.showfps 1” in console, then find system_server thread by top and kill it to reset the system.

 

  • Graphic benchmarks for 3D capability measurement

Quadrant

Full test benchmark cover CPU, Memory, IO, 2D and 3D

GLBenchmark

NenaMark2

An3DBench

AnTutu

3DMark

  • Browser benchmarks

 

3.  Android UI features

  • Dual display with same content

This feature is supported in the default image in Android i.MX 6 release package. In this feature, LVDS panel and HDMI output can be supported simultaneously. It is only enabled when the HDMI TV has been connected with the board.

  • Overscan for TV devices

Some TVs may miss display the contents in overscan area. To avoid the contents in overscan area being lost, the common implement is by underscanning with an adjustable black border and letitng the viewer adjust the width of the black border. The downscan operation is done by surfaceflinger when it does surface composition through HW OpenGL ES. There is no performance impact since all the work is done by GPU HW. Overscan can be configured in display setting in visual mode:

  • 32 bits color depth

32bpp UI can be supported by adding “bpp=32” in uboot as below:

setenv bootargs ‘… video=mxcdi1fb:RGB666,XGA,bpp=32 …’, also can configure it in display setting.

 

Enable 32bpp frame buffer and application surface buffer will be allocate to RGBA8888 format instead of default RGB565 format, that means more system memory is allocated.

 

After enabling 32bpp, if some applications still don't have better UI quality, check to see if  there is hard code to request RGB565 format surface (should request RGBA8888 format to get better quality).

 

Sample code is attached to test for 32bpp (left is on 16bpp, right is on 32bpp)

 

  • Display Visual Setting

The display setting is the add-on feature in FSL Android release, it is very convenient for end-users to change display property, mostly for the following features:

Dual display enablement

Display color depth setting(16bpp, 32bpp)

Overscan adjustment in horizontal and vertical orientation

 

4. Issue Diagnosis

 

  • Application Compatibility

Some Android applications may not run correctly on some Android releases. It may cause application compatibility, so check the application in other platforms.

 

For example Neocore and Asphalt 5 can run on Eclair, Froyo, and Gingerbread, but will not correctly run on Honeycomb.

 

  • GPU Compatibility

 

Some game UIs may not correctly display on our Android release. When encountering this kind of issue, the customer can check whether it is caused by the game using an OpenGL extension which our GPU does not support. They can download another data package (for example not extension data package) to have a check.

 

  • Others

 

Enlarge GPU memory if you encounter UI abnormally displaying after running an application for a while. Some applications need Wifi connections, so monitor the console log to see whether there are any error reports.

  • 3.3 K
    No security policy violations found. The file was last scanned 5 months ago.
  • 7.4 K
    No security policy violations found. The file was last scanned 5 months ago.

转载地址:http://paomi.baihongyu.com/

你可能感兴趣的文章
app自动化测试---ADBInterface驱动安装失败问题:
查看>>
九度OJ 1091:棋盘游戏 (DP、BFS、DFS、剪枝)
查看>>
c++使用宏检测类是否包含某个函数或者变量属性
查看>>
CSS之Multi-columns的column-gap和column-rule
查看>>
CSS之Multi-columns的跨列
查看>>
CSS之浮动(一)
查看>>
CSS之浮动(二)
查看>>
AtomicInteger源码解析
查看>>
CopyOnWriteArraySet源码学习
查看>>
Openfiler 配置 NFS 示例
查看>>
Oracle 11.2.0.1 RAC GRID 无法启动 : Oracle High Availability Services startup failed
查看>>
Oracle 18c 单实例安装手册 详细截图版
查看>>
Oracle Linux 6.1 + Oracle 11.2.0.1 RAC + RAW 安装文档
查看>>
Oracle 11g 新特性 -- Online Patching (Hot Patching 热补丁)说明
查看>>
Oracle 11g 新特性 -- ASM 增强 说明
查看>>
Oracle 11g 新特性 -- Database Replay (重演) 说明
查看>>
Oracle 11g 新特性 -- 自动诊断资料档案库(ADR) 说明
查看>>
Oracle 11g 新特性 -- RMAN Data Recovery Advisor(DRA) 说明
查看>>
CSDN博客之星 投票说明
查看>>
Oracle wallet 配置 说明
查看>>