UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRAPHIC BUFFER HANDLING INTERFACES
2016-06-01 11:48
627 查看
In this post, we touch IGraphicBufferProducer, IGraphicBufferAlloc.
IGraphicBufferProducer
Defined in include/gui/IGraphicBufferProducer.h, it was formerly known as ISurfaceTexture. It is the Interface underpinning the queueBuffer(), dequeueBuffer, requestBuffer() and cancelBuffer() operations in Surface class.
An IGraphicBufferProducer is instantiated in ISurfaceComposerClient::createSurface(); BnGraphicBufferProducer implementor is BufferQueue (declared in frameworks/native/include/gui/BufferQueue.h); In SurfaceFlinger, its subclass variant SurfaceTextureLayer with
reference to SurfaceFlinger is actually used, and each instance of SurfaceTextureLayer corresponds to a Layer instance.
IGraphicBufferAlloc
Defined in framework/native/include/gui/IGraphicBufferAlloc.h, IGraphicBufferAlloc’s use is coupled with IGraphicBufferProducer to realize dequeueBuffer() operation. ISurfaceComposer::createGraphicBufferAlloc() creates the interface.
In the SurfaceFlinger, the BnGraphicBufferAlloc implementor i
4000
s GraphicBufferAlloc, declared in framework/native/include/gui/GraphicBufferAlloc.h.
IGraphicBufferProducer
Defined in include/gui/IGraphicBufferProducer.h, it was formerly known as ISurfaceTexture. It is the Interface underpinning the queueBuffer(), dequeueBuffer, requestBuffer() and cancelBuffer() operations in Surface class.
An IGraphicBufferProducer is instantiated in ISurfaceComposerClient::createSurface(); BnGraphicBufferProducer implementor is BufferQueue (declared in frameworks/native/include/gui/BufferQueue.h); In SurfaceFlinger, its subclass variant SurfaceTextureLayer with
reference to SurfaceFlinger is actually used, and each instance of SurfaceTextureLayer corresponds to a Layer instance.
IGraphicBufferAlloc
Defined in framework/native/include/gui/IGraphicBufferAlloc.h, IGraphicBufferAlloc’s use is coupled with IGraphicBufferProducer to realize dequeueBuffer() operation. ISurfaceComposer::createGraphicBufferAlloc() creates the interface.
In the SurfaceFlinger, the BnGraphicBufferAlloc implementor i
4000
s GraphicBufferAlloc, declared in framework/native/include/gui/GraphicBufferAlloc.h.
相关文章推荐
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRALLOC AND HWCOMPOSER
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (III)
- Android开发之Activity launchMode启动模式
- UNDERSTANDING ANDROID GRAPHIC- SURFACEFLINGER (IV)
- Android根据网址获取网页源码并抓取相应字段
- PullScollToRefreshView scrollView GridView的嵌套
- UNDERSTANDING ANDROID GRAPHICS INTERNALS – SURFACEFLINGER (I)
- android日常使用积累
- UNDERSTANDING ANDROID GRAPHICS INTERNALS -SURFACEFLINGER(V)
- android 手势识别代码
- Android解决NDK not configured问题
- 初识android内存的一些解决方案
- Android动画 - Vector Animation
- Android是最牛的
- android实现仿QQ登陆界面的多账号保存
- 最近AndroidStudio遇到了好几次奇怪的问题,程序正确,调试就是运行错误
- Android开发中单用户登录的逻辑
- Android应用更新自动检测下载
- Android NDK开发之Hello-JNI!
- Android Studio 使用 OpenCV 的配置方法