BufferQueue 详解

知其所以然
Article Directory

一张图把整个 BufferQueue 从上到下点清楚

flowchart LR
	hwui <--> a[OpenGL/EGL]
	游戏引擎 <--> a
	a <--> Surface --> b
	subgraph BLASTBufferQueue
	BBQBufferQueueProducer --> b
	BLASTBufferItemConsumer --> bic[BufferItemConsumer] --> c
	bic --> ConsumerBase 
	subgraph BufferQueue
	b[BufferQueueProducer] <--> BufferQueueCore <--> c[BufferQueueConsumer]
	subgraph BufferQueueCore
	biv[Vector<BufferItem> mQueue]
	slt[mSlots]
	slt --> mFreeSlots
	slt --> mFreeBuffers
	slt --> mAcquireBuffers
	slt --> mUnusedSlots
	end
	end
	end
	BufferQueueCore --> Gralloc --> ION
	BufferQueue -- Buffer --> t[SurfaceComposerClient::Transaction] --> s[SurfaceFlinger]
	SurfaceComposerClient --> Client --> s
	SurfaceControl --> t

Author: simowce

Permalink: https://blog.simowce.com/all-about-bufferqueue/

知识共享许可协议
本作品采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可。