44addfe5d29023045784293459fab78a5899863b |
|
14-Mar-2018 |
Jiwen 'Steve' Cai <jwcai@google.com> |
GraphicBuffer: add optional DetachedBufferHandle Stores a BufferHub handle that can be used to reattach this GraphicBuffer back into a BufferHub producer/consumer set. In terms of GraphicBuffer's relationship with BufferHub, there are three different modes: 1. Legacy mode: GraphicBuffer is not backed by BufferHub and mDetachedBufferHandle must be invalid. 2. Detached mode: GraphicBuffer is backed BufferHub, but not part of a producer/consumer set. In this mode, mDetachedBufferHandle must be valid. 3. Attached mode: GraphicBuffer is backed BufferHub and it's part of a producer/consumer set. In this mode, mDetachedBufferHandle must be invalid. Note that the DetachedBufferHandle is used as a opaque handle for GraphicBuffer and it's not exposed to VNDK. Bug: 38137191 Bug: 69982239 Bug: 70046255 Bug: 70912269 Test: GraphicBuffer_test Change-Id: I4c3a967cb498291aa175312fdadc84edd3b1a8be
/frameworks/native/libs/ui/tests/GraphicBuffer_test.cpp
|