###
计算机系统应用英文版:2017,26(10):95-101
本文二维码信息
码上扫一扫!
SurfaceFlinger在X Window系统环境下的运行方案
(中国科学院 软件研究所 基础软件国家工程研究中心, 北京 100190)
Method to Run SurfaceFlinger on X Window System
(National Engineering Research Center of Fundamental Software, Institue of Sofware, Chinese Academy of Sciences, Beijing 100190, China)
摘要
图/表
参考文献
相似文献
本文已被:浏览 1661次   下载 2920
Received:January 17, 2017    
中文摘要: 本文给出一种将Android图形系统SurfaceFlinger移植到桌面Linux发行版的X Window系统环境下运行的方案.在X Window系统环境下运行的SurfaceFlinger可使Android运行环境中以本地进程形式的Android应用进程的UI界面显示到X Window的窗口中.使用Mesa作为OpenGL ES实现并使Mesa EGL兼容Android的本地窗口ANativeWindow,同时借助Androidx86的gralloc.drm.so模块,实现了Android应用程序的UI渲染过程SurfaceFlinger的图像合成过程能够使用GPU进行硬件加速.另外,用X11的DRI2扩展协调SurfaceFlinger的窗口和X Server的DDX驱动,使合成后的图像能高效地更新到窗口中,避免了SurfaceFlinger的图像缓存由独立显存到系统内存的拷贝过程.经实验,在本移植方案下,第三方3D基准测试软件San-Angeles能达到60FPS的帧率.相比于已有方案,本方案的架构更加简洁高效,且支持硬件加速.
Abstract:This paper presents a method to transplant Android's graphic system, SurfaceFlinger, to run on desktop Linux distribution's X Window System. SurfaceFlinger running on X can make UI of the Android applications, running as native processes in the desktop Android runtime, show in a window of X. Using Mesa as the OpenGL ES implementation and making Mesa EGL compatible with Android's native window, together with gralloc.drm.so module, the Android UI rendering process and SurfaceFlinger's graphic compositing process can be implemented by using the GPU for hardware acceleration. In addition, using X11's DRI2 extension to coordinate window of SurfaceFlinger with X Server's DDX driver, can avoid graphic buffer coping from GPU's dedicated memory to the system memory. In our experiment, the third-party 3D benchmark software San-Angeles can achieve 60FPS on variety GPUs. Compared with the existing method, the architecture of our method is more concise, efficient, and supportive of hardware acceleration.
文章编号:     中图分类号:    文献标志码:
基金项目:国家科技重大专项(2012ZX01039-004)
引用文本:
江帆,贺也平,周启明.SurfaceFlinger在X Window系统环境下的运行方案.计算机系统应用,2017,26(10):95-101
JIANG Fan,HE Ye-Ping,ZHOU Qi-Ming.Method to Run SurfaceFlinger on X Window System.COMPUTER SYSTEMS APPLICATIONS,2017,26(10):95-101