您的位置:首页 > 移动开发 > Android开发

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: