Adds logic to dequeueBuffer that blocks if there are currently too
many buffers in the queue. This prevents unbounded growth around
times where the slots are cleared but the queue is not (e.g.,
during rapid connect/disconnect or setBufferCount activity). This
replaces the fix from ag/377958 in a more general way.
Bug: 11293214
Change-Id: Ieb7adfcd076ff7ffe3d4d369397b2c29cf5099c3
Increases NUM_BUFFER_SLOTS from 32 to 64 and changes the mask
returned by IGBC::getReleasedBuffers from 32 to 64 bits.
Bug: 13174352
Change-Id: Ie8ef0853916cfb91f83881c7241886bb1950f01a
Adds a StreamSplitter class, that takes one IGraphicBufferConsumer
interface and multiple IGraphicBufferProducer interfaces and
implements a one-to-many broadcast of GraphicBuffers (while managing
fences correctly).
Change-Id: I38ecdf3e311ac521bc781c30dde0cc382a4376a3
Adds a new method, IGBP::detachNextBuffer, that effectively does
dequeue + request + detach in a single call, but does not need to
know anything about the dequeued buffer, and will not block on
dequeue. This is mostly for the upcoming StreamSplitter to use in
its onBufferReleased callback.
Change-Id: Ie88a69de109003acebaa486a5b44c8a455726550
* commit 'ef89f7638c43ce5f73e32d487bf65c3375995e3b':
Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit 'cf818ebbf07c6a20ef48d71bf82f8d4bdf3a398c':
Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
There are a number of places where we create a local
sp<SurfaceComposerClient>& to something that is already an
sp<SurfaceComposerClient>, which is redundant. This fixes that
by removing the local references.
Bug: 13814149
Change-Id: Ic558cbda651c344e5cac97022c97563928eed29c
It turns out that there's no reason to have both I* and Bn* versions
of the createBufferQueue method, so I removed the Bn* version.
Change-Id: I66aeb09e10458ae540ddf1f38d2d0154ea8f315b
- Notify a listener when sideband stream is set
- Mark a layer as visible when sideband stream is set, even though
no buffer is queued.
Change-Id: I9652bf530f2b5ce331533ec1bb3b10a815ca191c
* commit '00f4dde1aa88576811bca79bc8242e1fc1edb333':
Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit 'c57a019e117117c5a76c772970b26cd0f5db8c6a':
Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
In GLConsumer's updateAndReleaseLocked(), we must release either
the previously-acquired buffer or the newly-acquired buffer.
Bug 13755224
Change-Id: I96adc255400ed008ba6e6ac1725ab3514c7cc8ba
Add a callback to the producer side, onBufferReleased, which will be
called every time the consumer releases a buffer back to the
BufferQueue. This will enable a buffer stream splitter to work
autonomously without having to block on dequeueBuffer.
The binder object used for the callback replaces the generic IBinder
token that was passed into IGraphicBufferProducer::connect to detect
the death of the producer. If a producer does not wish to listen for
buffer release events, it can pass in an instance of the
DummyProducerListener class defined in IProducerListener.h, if it even
cares about death events (BufferQueue doesn't enforce the token being
non-NULL, though perhaps we should).
Change-Id: I23935760673524abeafea2b58dccc3583b368710
When a buffer is attached to the producer side, it needs to be marked
as having been requested so that it can be queued successfully.
Change-Id: I90a88b332c415a57921bd094ae635afdf65bff99
Adds a test that puts the BufferQueue into its own process and
connects to it over remote binder interfaces. This exposed the fact
that while IGBC was technically binderized, it didn't actually work
when flattened, so this change also fixes that.
Change-Id: I728cdb662a4273ddd3440ed6040a12560313fe68
This adds a second createBufferQueue method that returns
sp<IGraphicBuffer*> interfaces instead of sp<BnGraphicBuffer*>, since
most clients don't actually need the Binderized versions (but some
might).
Change-Id: Iaf4f719c96ddb6f704afc75cf52be22588173e32
Sideband streams are essentially a device-specific buffer queue that
bypasses the BufferQueue system. They can be used for situations with
hard real-time requirements like high-quality TV and video playback
with A/V sync. A handle to the stream is provided by the source HAL,
and attached to a BufferQueue. The sink HAL can read buffers via the
stream handle rather than acquiring individual buffers from the
BufferQueue.
Change-Id: Ib3f262eddfc520f4bbe3d9b91753ed7dd09d3a9b
Adds detachBuffer and attachBuffer calls to both the producer and
consumer sides of BufferQueue. Buffers may be detached while dequeued
by the producer or acquired by the consumer, and when attached, enter
the dequeued and acquired states, respectively.
Bug: 13173343
Change-Id: Ic152692b0a94d99e0135b9bfa62747dab2a54220