关闭

UNDERSTANDING ANDROID GRAPHICS INTERNALS – GRAPHIC BUFFER HANDLING INTERFACES

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

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 is GraphicBufferAlloc, declared in framework/native/include/gui/GraphicBufferAlloc.h.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:14562次
    • 积分:280
    • 等级:
    • 排名:千里之外
    • 原创:8篇
    • 转载:38篇
    • 译文:0篇
    • 评论:0条
    文章分类