Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c6fcf2fc authored by Jiwen 'Steve' Cai's avatar Jiwen 'Steve' Cai Committed by Jiwen Cai
Browse files

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
parent d3788632
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment