Break up and rename buffer_hub_cilent.{h, cpp}
Code in buffer_hub_cilent.{h,cpp} was the main client side
implementation of bufferhub. With years of developements, the content
of it was complicated enough to deserved separated files. Also rename
stuff for clarification.
old names:
+-------------------+
| BufferHubBuffer |
+---------^---------+
|
+------------------+ | +------------------+
| BufferProducer +----+-----+ BufferConsumer |
+------------------+ +------------------+
new names:
+-----------------+
| BufferHubBase |
+--------^--------+
|
+------------------+ | +------------------+
| ProducerBuffer +----+-----+ ConsumerBuffer |
+------------------+ +------------------+
Rename rationale:
1/ BufferProducer was originally poorly named and gets easily confused
with IGraphicBufferProducer. Actually, BufferProducer is a single
buffer that can produce (i.e. write) data into a buffer, but it
doesn't produce buffer. On the other hand, IGraphicBufferProducer
is the producer end of a BufferQueue and it is used to produce buffers.
2/ BufferConsumer was originally poorly named and gets easily confused
with IGraphicBufferConsumer. Actually, BufferConsumer is a single
buffer that can consume (i.e. read) data from a buffer, but it
doesn't consume buffer. On the other hand, IGraphicBufferConsumer
is the consumer end of a BufferQueue and it is used to consume
buffers.
3/ BufferHubBuffer is a pure base class and cannot be used
standalone. The old name suggests that it's a buffer object backed
by BufferHub, which might leads to confusion. Also, this rename is
in preparation of rename DetachedBuffer to BufferHubBuffer.
Bug: 116855254
Test: Build system
Change-Id: Id545648f5bdc7660e58f7bb49722651ae3bcca70
diff --git a/libs/vr/libbufferhub/Android.bp b/libs/vr/libbufferhub/Android.bp
index 69b6422..edc9131 100644
--- a/libs/vr/libbufferhub/Android.bp
+++ b/libs/vr/libbufferhub/Android.bp
@@ -13,10 +13,13 @@
// limitations under the License.
sourceFiles = [
+ "buffer_hub_base.cpp",
"buffer_hub_client.cpp",
"buffer_hub_rpc.cpp",
+ "consumer_buffer.cpp",
"detached_buffer.cpp",
"ion_buffer.cpp",
+ "producer_buffer.cpp",
]
localIncludeFiles = [