Add BufferHub backend for android::view::Surface
This CL allows BufferHubProducer to be used as alternative backend of
parcelable Surface.
When sent over binder, BufferHubProducer serializes itself differently
from Binder-based IGBP objects. Instead of writing to a Parcel object as
strong binder object, BufferHubProducer asks libbufferhubqueue to
generate a BufferHubQueueParcelable object (which packs all the FDs
representing the BufferHub channel).
When received from a binder interface, BufferHubProducer object can be
reconstructed from the BufferHubQueueParcelable object. The newly
constructed object has all the FDs (i.e. UDS channels) directly
connected to bufferhubd. Thus, on going buffer transport operations can
happen directly between the receiving process and bufferhubd. This
elimates one extra binder hop.
Bug: 37517761
Bug: 70046255
Test: libgui_test, buffer_transport_benchmark,
buffer_hub_queue_producer-test, dvr_api-test,
SurfaceParcelable_test
Change-Id: I78bd879f36d3196f3d74c76c79d27467740792f7
7 files changed