关闭

UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (I)

571人阅读 评论(0) 收藏 举报
分类:

from: https://charleszblog.wordpress.com/2014/02/22/understanding-android-internals-surfaceflinger-i/

Let’s recapture what we have known of SurfaceFlinger from previous posts on Android Graphics.
1. it is a native service implementing BnSurfaceComposer;
2. SurfaceFlinger administrates Surface and Graphic Buffer creation for all graphic clients;
3. Periodically, SurfaceFlinger composes surface layers to the back frame buffer in the frame buffer to the abstraction frame buffer device, and submit layers marked for hardware composition to hwcomposer hardware abstraction module for rendering in case of
4. SurfaceFlinger enforces vsync and triple buffering;
5. Supports snapshot of screen display;
6. Supports HDMI display and virtual display (e.g. Wireless Display);
7. It heavily relies on GLES and EGL.
With these knowledge in mind, we proceed to make some conjectures on it design.
1. To run surface composition, it has to own a dedicated thread;
2. It must maintain a context for each individual surface layer
This is done with Layer structure which tracks orientation, cropping, geometric parameters, color scheme, visible region, etc.
3. It must distinguish between the drawing state (front) and currently rendering state (back) for each layer
This is done with the Layer::State structure.
4. It must quarantine the set of currently active rendering layers from layers newly removed and added
This is done with SurfaceFlinger::state structure
5. vsync event is asynchronous of surface composition, we may need a thread somewhere to monitor vsync event

In next post, we will discuss vsync. In my view, vsync was the main force to drive the redesign of SurfaceFlinger in Jelly Bean.

0
0
查看评论
发表评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场

Android graphics 学习-生产者、消费者、BufferQueue介绍

备注:博文根据Android5.1代码分析,为个人学习笔记。如有问题,欢迎指正。   博文是后续理解Camera preview,recording buffer流转的基础。要不然后续Camera ...
  • armwind
  • armwind
  • 2017-06-18 22:52
  • 1815

Android6.0 显示系统(五) SurfaceFlinger服务

SurfaceFlinger是一个独立的进程,我们来看下init.rc关于SurfaceFlinger的代码,我们可以看到SurfaceFlinger是属于core服务的。 service surfa...
  • kc58236582
  • kc58236582
  • 2016-10-10 10:57
  • 5790

Android4.4深入浅出之SurfaceFlinger与Client通信框架(一)

SurfaceFlinger服务运行在System进程中,用来统一管理系统的帧缓冲区设备。由于SurfaceFlinger服务运行在System进程中,因此,Android应用程序就需要通过Binde...
  • w401229755
  • w401229755
  • 2014-07-31 15:42
  • 7059

A-Deeper-Understanding-of-Spark-Internals(Spark内核深入理解)

这篇文章是对Spark Submit 2014会议上Aaron Davidson做的报告的PPT内容的整理,报告主要讲了Spark中shuffle过程的调优。 做了下整理,加入一些自己的理解。   G...
  • sdujava2011
  • sdujava2011
  • 2016-01-28 21:52
  • 509

Understanding JVM Internals

原文地址:http://www.cubrid.org/blog/dev-platform/understanding-jvm-internals/
  • jayceyxc635
  • jayceyxc635
  • 2015-09-06 17:40
  • 65

Developing for Android, I: Understanding the Mobile Context

Context or Why These Rules Matter It is important to understand the context in which ...
  • u011919407
  • u011919407
  • 2015-06-04 23:48
  • 198

Windows Internals – 0 开篇

Windows Internals - 0 开篇
  • chenyc09
  • chenyc09
  • 2017-07-14 17:05
  • 289

Windows Internals – 1.1 概念与工具之Windows版本

Windows Internals - 1.1 概念与工具之Windows版本
  • chenyc09
  • chenyc09
  • 2017-07-14 17:05
  • 317

Windows Internals – 1.2 概念与工具之Windows API

Windows Internals - 1.2 概念与工具之Windows API
  • chenyc09
  • chenyc09
  • 2017-07-14 17:06
  • 298

Understanding Photometric and Radiometric units and their application to computer graphics

参考: http://mentalraytips.blogspot.com/2007/03/understanding-photometric-and.html Understanding Phot...
  • aa20274270
  • aa20274270
  • 2016-07-28 21:57
  • 356
    个人资料
    • 访问:19597次
    • 积分:331
    • 等级:
    • 排名:千里之外
    • 原创:8篇
    • 转载:38篇
    • 译文:0篇
    • 评论:0条
    文章分类