UNDERSTANDING ANDROID GRAPHIC- SURFACEFLINGER (IV)
来源:互联网 发布:最火的网络流行歌曲 编辑:程序博客网 时间:2024/06/06 01:29
Having known that BufferQueue exposes the APIs for consuming surface frame while implementing BnGraphicBufferProducer, we continue our attempt to demystify surface compositions and rendering with an examination of a few more classes with respect to surface composing.
- SurfaceFlingerConsumer and GLConsumer class
Defined in framework/native/services/surfaceflinger/SurfaceFlingerConsumer.h, and framework/native/include/gui/GLConsumer.h,SurfaceFlingerConsumer and GLConsumer are the core classes to fetch the current buffer from BufferQueue to bind to a surface layer specific GL texture. GLConsumer uses GLES functions to conduct the operation while SurfaceFlingerConsumer is a wrapper around it to safeguard the operation. The main APIs in SurfaceFlingerConsumerare updateTexImage() and bindTextureImage().
Note that a surface frame will be drawn to the display frame buffer as a GL texture and GLConsumer inherits from ConsumerBase.
- Layer Class
It has been known that when a SurfaceComposerClient::createSurface is invoked, Client in SurfaceFlinger posts a MessageCreateLayer toSurfaceFlinger which in turn calls SurfaceFlinger::createLayer() create aLayer instance to service the remote Surface instance.
Applying a lazy initialization, Layer delays until first reference to instantiate a BufferQueue object and SurfaceFlingerConsumercorresponding to the remote Surface object; meanwhile Layer links the BufferQueue object to SurfaceFlingerConsumer object and register itself as SurfaceFlingerConsumer::FrameAvailableListener listener among other procedures.
When Surface::queueBuffer() is invoked, BufferQueue::queueBuffer() and Layer::onFrameAvailable() call ensue ,as we elaborated in post SurfaceFlinger(III).
Subsequently , the Layer::draw() and Layer::onDraw() will be called to run SurfaceFlingerConsumer::bindTextureImage() andLayer::drawWithOpenGL() to FramebufferSurface current frame buffer.
- UNDERSTANDING ANDROID GRAPHIC- SURFACEFLINGER (IV)
- Android Graphic SurfaceFlinger 疑难解答
- Android Graphic SurfaceFlinger分析
- Android 4.2 JellyBean Graphic Component -- SurfaceFlinger 1
- Android 4.2 JellyBean Graphic Component -- SurfaceFlinger 2
- android graphic(4)—surfaceflinger和Vsync
- android graphic(6)—surfaceflinger和MessageQueue
- android graphic(4)—surfaceflinger和Vsync
- android graphic(6)—surfaceflinger和MessageQueue
- UNDERSTANDING ANDROID GRAPHICS INTERNALS -SURFACEFLINGER(V)
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (I)
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (II)
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (III)
- android graphic(3)—surfaceflinger的启动流程
- android graphic(5)—surfaceflinger和Vsync (简化)
- android graphic(3)—surfaceflinger的启动流程
- android graphic(5)—surfaceflinger和Vsync (简化)
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRAPHIC BUFFER HANDLING INTERFACES
- iOS RSA的网络安全模型、iOS签名机制总结(登录、token安全、签名)
- git 使用
- CocoaPods的使用
- android 自定义导航控件源码
- 支付-va.net.UnknownHostException: mapi.alipay.com
- UNDERSTANDING ANDROID GRAPHIC- SURFACEFLINGER (IV)
- 地图POI(兴趣点)数据的爬虫(突破限制)
- gimp toolbox
- QtCreator 生成动态库
- 大型网站系统架构的演化
- Android开发之Activity launchMode启动模式
- Android中如何在Parcelable中使用泛型?
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (III)
- 程序员,请远离拖延症!