History log of /frameworks/native/include/gui/IGraphicBufferConsumer.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c6ff79830b9126f948791f03164a58ad079e9e5d 14-Jun-2017 Eino-Ville Talvala <etalvala@google.com> ConsumerBase: discardFreeBuffers() also needs to dump its own cache

ConsumerBase has its own cached slots with graphic buffer references,
so it's not enough to just ask the buffer queue consumer to free
buffers.

Add code equivalent to what happens in the onBuffersReleased callback.

Test:
Bug: 62593139
Change-Id: Ibc1444b868c6150aa2da1c209e06bdba42f1595d
/frameworks/native/include/gui/IGraphicBufferConsumer.h
2041913a05b79b96c5c084f30bb8944049a976c8 22-Apr-2017 Jiwen 'Steve' Cai <jwcai@google.com> BufferQueue: plumbing mConsumerIsProtected

This replaces current logic in BufferQueue that uses
GRALLOC_USAGE_PROTECTED to indicate whether an ANativeWindow is capable
of handling hardware protected gralloc buffers. Current logic is
problematic as it enforces producer to use protected buffer no matter
whether producer side is capable of writing into a protected buffer.

This new solution, however, introduces a new NATIVE_WINDOW_* flag that
consumer can set on IGraphicBufferConsumer to indicate its capacity,
which can then be queried by producer via Surface::query (or
IGraphicBufferProducer::query).

When consumer is capable of reading protected buffer (e.g. a protected
GL context), the producer can generate either a protected or unprotected
buffer.

When consumer is not capable of reading protected buffer, the producer
should only generate unprotected buffer.

Bug: 35726763
Test: videoplayer-nodrm-protected.apk and videoplayer-drm-protected.apk
both works.

Change-Id: I1bf6814c9f1f81f9e04f0e89646b0733ff1a4758
/frameworks/native/include/gui/IGraphicBufferConsumer.h
4b5fbdb107cf25bf0cad040a63cf51399ce9215b 10-Apr-2017 Dan Stoza <stoza@google.com> libgui: Make IGraphicBufferConsumer a SafeInterface

Converts IGraphicBufferConsumer to be a SafeInterface such that all
parceling/unparceling is done automatically.

Test: libgui_tests + manual testing
Change-Id: Ica5f5f5c3e6b5735f0f1327a50cefe8f3f6f0feb
/frameworks/native/include/gui/IGraphicBufferConsumer.h
0c9a1ed91f8e19887ac43eff5af16e59878c8226 07-Apr-2017 Dan Stoza <stoza@google.com> libgui: Normalize IGraphicBufferConsumer methods

This change modifies IGraphicBufferConsumer such that all synchronous
methods return a status_t and, as such, all outputs are returned by
output parameter rather than return value. It also eliminates the use
of a const char* parameter that SafeInterface can't handle.

Test: m -j + libgui_tests + manual testing
Change-Id: I9bb0e2892492d5e0a3f660bf228834b9ed014539
/frameworks/native/include/gui/IGraphicBufferConsumer.h
1d0359c5a8e19a3ad0bb3e0d8265c32bab6f0d4d 06-Apr-2017 Dan Stoza <stoza@google.com> libgui: Format IGraphicBufferConsumer

Applies the framework default .clang-format and does a bit of tidying
up (cleaning up and reflowing comments to 100 characters, reordering
includes, etc.).

Test: libgui_tests + manual testing
Change-Id: I6a4c6149282661ad1bf92571597d22123c3ba93c
/frameworks/native/include/gui/IGraphicBufferConsumer.h
a9347647eca3101c014be902b713772de3977d87 14-Feb-2017 Mathias Agopian <mathias@google.com> Break a dependency of libui on libandroid

This was only a header dependency, but it still
created a circular dependency, which will cause
problems in another CL.

We fix this by creating a libarect static library
containing only that header. both libui and
libandroid now depend on it and reexport the
header.

We also make sure rect.h ends-up in the right
place.

Test: built and booted device
Bug: 35164655

Change-Id: Iba25b8b801b26b26ec1401c00caf367a06f197ca
/frameworks/native/include/gui/IGraphicBufferConsumer.h
3d1d280fa3cbc30700f728a4b13e5308315433d3 27-Sep-2016 Colin Cross <ccross@android.com> Rename dump methods to dumpState

The dump methods shadow the IBinder dump method. The warnings were being
hidden by the use of -isystem to include frameworks/native/include.

Bug: 31752268
Test: m -j
Change-Id: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
/frameworks/native/include/gui/IGraphicBufferConsumer.h
b0300ea6f1f37973851b87b4c0892967f11c537a 28-Sep-2016 Colin Cross <ccross@android.com> Fix trailing semicolon warnings am: 17576de056 am: 170ae8a510
am: df1b5a19fd

Change-Id: I1beb53002656be0ca988c18108d5e9a565a1f707
17576de056a57753eb4af797545db88ef4f81ef0 26-Sep-2016 Colin Cross <ccross@android.com> Fix trailing semicolon warnings

Remove semicolons after inline function definitions. The warnings were
being hidden by the use of -isystem to include
frameworks/native/include.

Bug: 31752268
Test: m -j
Change-Id: I1027e87f459c36a575cd04b3afb645736832b07b
/frameworks/native/include/gui/IGraphicBufferConsumer.h
bc2df65a3f3f4b8abaaaa2a4e576a3a42c2d30f3 22-Jul-2016 Eino-Ville Talvala <etalvala@google.com> BufferQueue consumers: Add discardFreeBuffer method

This method releases all free buffers owned by the buffer queue,
in order to save memory (at the cost of potential future
reallocation of buffers).

Bug: 28695173
Change-Id: I458d10373e639e3144faf673af2ba01aca36e65a
/frameworks/native/include/gui/IGraphicBufferConsumer.h
e77c7669bee30b7c0099172cf0c38cef92412040 13-May-2016 Dan Stoza <stoza@google.com> BufferQueue/SF: Add OccupancyTracker

Adds an OccupancyTracker to BufferQueue. This module keeps track of
how many buffers are in the queue over time, which, in combination
with various aggregation of these statistics, allows SurfaceFlinger
to report what fraction of the time a given layer was double- or
triple-buffered.

Change-Id: Ida6e967dc5483c00a633e9fe03998e420dd88502
/frameworks/native/include/gui/IGraphicBufferConsumer.h
72daab652e3481566c01ce45c6afdb9fcec6f140 08-Dec-2015 Pablo Ceballos <pceballos@google.com> BQ: Flexible resizing

- Allow the producer to call setMaxDequeuedBufferCount and the
consumer to call setMaxAcquiredBufferCount when buffers are
currently dequeued/acquired as long as the new value is not less
than the number of dequeued/acquired buffers.

Bug 22768206

Change-Id: I599a4027a6ae9cb0a1c0d5ec60cb5e65b86a345b
/frameworks/native/include/gui/IGraphicBufferConsumer.h
23b4abe024ea88c45e0b94c80e1fb537a573b143 08-Jan-2016 Pablo Ceballos <pceballos@google.com> BQ: Improved buffer/slot tracking

- Explicitly track active buffers and unused slots on top of the
already existing tracking for free slots and free buffers.

Change-Id: Ife2678678e96f0eb0b3fb21571058378134bd868
/frameworks/native/include/gui/IGraphicBufferConsumer.h
19e3e06e3c65a7c001a6fe0971744ba5ff536515 20-Aug-2015 Pablo Ceballos <pceballos@google.com> BQ: Modify consumer buffer count interfaces

- Rename setDefaultMaxBufferCount() to setMaxBufferCount(). Modify it
to be hard maximum on the number of buffers that can't be overwritten
by the producer.
- Enforce the maximum buffer count in setMaxAcquiredBufferCount(),
setMaxDequeuedBufferCount(), and setAsyncMode().
- Remove mOverrideMaxBufferCount as it's no longer needed since
overriding is no longer possible.
- Expose setMaxAcquiredBufferCount() in GLConsumer.
- Remove disableAsyncBuffer(), it was only being used for single buffer
mode. Single buffer mode is now achievable with setMaxBufferCount().

Bug 13174928

Change-Id: Ia33799f42751272a711fbd8559f7602ce9f18e4f
/frameworks/native/include/gui/IGraphicBufferConsumer.h
812ed0644f8f8f71ca403f4e5793f0dbc1fcf9b2 03-Jun-2015 Dan Stoza <stoza@google.com> libgui: Add generation numbers to BufferQueue

This change allows producers to set a generation number on a
BufferQueue. This number will be embedded in any new GraphicBuffers
created in that BufferQueue, and attempts to attach buffers which have
a different generation number will fail.

It also plumbs the setGenerationNumber method through Surface, with the
additional effect that any buffers attached to the Surface after
setting a new generation number will automatically be updated with the
new number (as opposed to failing, as would happen on through IGBP).

Bug: 20923096
Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2
/frameworks/native/include/gui/IGraphicBufferConsumer.h
a4650a50a0b35e9e4342d6600b6eb24fd94bb8e5 12-May-2015 Dan Stoza <stoza@google.com> Fix PTS handling for buffer replacement

This changes the way that SurfaceFlinger's shadow buffer management
works such that instead of tracking the size of the shadow queue in the
BufferQueue, SF tracks the last frame number it has seen, and passes
that into the acquireBuffer call. BufferQueueConsumer then ensures that
it never returns a buffer newer than that frame number, even if that
means that it must return PRESENT_LATER for an otherwise valid buffer.

Change-Id: I3fcb45f683ed660c3f18a8b85ae1f8a962ba6f0e
/frameworks/native/include/gui/IGraphicBufferConsumer.h
ecc504043fddb7a75042ce402c67aedfac04d5e2 28-Apr-2015 Dan Stoza <stoza@google.com> SurfaceFlinger: Fix PTS on stale buffers

SurfaceFlinger's (Layer's) shadow copy of the BufferQueue queue was
getting out of sync for a few reasons. This change fixes these by
doing the following:

- Adds a check to re-synchronize the shadow copy every time we
successfully acquire a buffer by first dropping stale buffers before
removing the current buffer.
- Avoids trying to perform updates for buffers which have been rejected
(for incorrect dimensions) by SurfaceFlinger.
- Adds IGraphicBufferConsumer::setShadowQueueSize, which allows the
consumer to notify the BufferQueue that it is maintaining a shadow
copy of the queue and prevents it from dropping so many buffers
during acquireBuffer that it ends up returning a buffer for which the
consumer has not yet received an onFrameAvailable call.

Bug: 20096136
Change-Id: I78d0738428005fc19b3be85cc8f1db498043612f
(cherry picked from commit 2e36f2283f48ab764b496490c73a132acf21df3a)
/frameworks/native/include/gui/IGraphicBufferConsumer.h
54716317b5752010134edc64421a3f492bd608ab 13-Mar-2015 Dan Stoza <stoza@google.com> libgui: Remove IGBC::BufferItem

Removes IGraphicBufferConsumer::BufferItem. Depends on the
following changes:
I187b3a7d05196b6289596afac8fb9a9d4aebff76
I0ddd38df37500cfd6b21d1e768ed14e39c5cd9fc

Change-Id: Id1fa56d092188f2cb712768d5d2fc6a9027fb73c
/frameworks/native/include/gui/IGraphicBufferConsumer.h
de7100ab2304434f73cbd1022823835184511d04 12-Mar-2015 Dan Stoza <stoza@google.com> libgui: Add a BufferItem overload to IGBC::acquire

Adds an overload of IGraphicBufferConsumer::acquireBuffer which takes
an android::BufferItem instead of an IGBC::BufferItem.

Change-Id: I9c3bc8037fa9438d4d9080b8afb694219ef2f71f
/frameworks/native/include/gui/IGraphicBufferConsumer.h
5b75a513e431c097ae704cba2f7affa6bfaecec9 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Add dataSpace to buffer queues; remove old format enums.

- Wire up new dataSpace parameter through buffer queue stack
- Update tests to include the parameter
- Switch eglApi to using dataSpace to indicate sRGB gamma/linear
difference
- Remove RAW_SENSOR in favor of RAW16
- Remove use of sRGB format enums
- Add default dataspace to buffer queue core
- Add query for default dataspace

Change-Id: I070bd2e7c56506055c419004c29e2e3feac725df
/frameworks/native/include/gui/IGraphicBufferConsumer.h
d723bd7669b4fc88dc282d8bf8ba5ecb2849d22f 18-Nov-2014 Dan Stoza <stoza@google.com> libgui: Enable -Weverything and -Werror

Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
/frameworks/native/include/gui/IGraphicBufferConsumer.h
fb39827ebce4637dcba03770f6644cf67e932e06 21-Apr-2014 Dan Stoza <stoza@google.com> Merge "BufferQueue: Increase max slots from 32 to 64"
febd4f4f462444bfcb3f0618d07ac77e3fc1f6ad 10-Apr-2014 Dan Stoza <stoza@google.com> BufferQueue: Increase max slots from 32 to 64

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
/frameworks/native/include/gui/IGraphicBufferConsumer.h
99b18b447dec188bcec37b415603b9dd400fc7e1 28-Mar-2014 Dan Stoza <stoza@google.com> BufferQueue: Add StreamSplitter

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
/frameworks/native/include/gui/IGraphicBufferConsumer.h
73ed82f809a40560fd3a6d53d18e5c846362d764 13-Mar-2014 Jesse Hall <jessehall@google.com> Merge "Add sideband streams to BufferQueue and related classes"
399184a4cd728ea1421fb0bc1722274a29e38f4a 04-Mar-2014 Jesse Hall <jessehall@google.com> Add sideband streams to BufferQueue and related classes

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
/frameworks/native/include/gui/IGraphicBufferConsumer.h
9f3053de78630815d60cf48a2cf2348cc5867c45 07-Mar-2014 Dan Stoza <stoza@google.com> BufferQueue: Allow detaching/reattaching buffers

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
/frameworks/native/include/gui/IGraphicBufferConsumer.h
7d2d160cdc3cba9f4454f38433c94b68376cb843 13-Nov-2013 Igor Murashkin <iam@google.com> gui: Update header docs for IGraphicBufferConsumer/Producer/BufferQueue

Also fix compiler warnings for libgui

Change-Id: I0ee38d9ad5eaa82d55bf812d291da8c433581cef
/frameworks/native/include/gui/IGraphicBufferConsumer.h
c1c05de415854eb7a13a16b7e22a22de8515123a 18-Sep-2013 Mathias Agopian <mathias@google.com> fix camera API 2.0 orientation

we add a flag to ANativeWindow::setBufferTransform that means
"apply the inverse rotation of the display this buffer is displayed
onto to".

Bug: 10804238
Change-Id: Id2447676271950463e8dbcef1b95935c5c3f32b2
/frameworks/native/include/gui/IGraphicBufferConsumer.h
3c25621ad7d13f64d3ab95a27fa970fbc9998f73 16-Aug-2013 Andy McFadden <fadden@android.com> Re-enable frame dropping for non-auto timestamps

This change adds an entire field to note whether the timestamp was
auto-generated by Surface or supplied by the application.

The value is used when deciding whether or not to drop frames based
on buffer presentation timestamps. If a desired presentation time
was set explicitly, BufferQueue will use that value to decide if a
frame should be dropped. If the timestamp was generated by Surface
at the time the buffer was queued, the timestamp is ignored.

Bug 10151804

Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
/frameworks/native/include/gui/IGraphicBufferConsumer.h
db89edc94bd2a78226b407f9f7261e202e7fa325 02-Aug-2013 Mathias Agopian <mathias@google.com> All consumers now take an IGraphicBufferConsumer instead of a BufferQueue

this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that

Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
/frameworks/native/include/gui/IGraphicBufferConsumer.h
a4e19521ac4563f2ff6517bcfd63d9b8d33a6d0b 01-Aug-2013 Mathias Agopian <mathias@google.com> Binderize the consumer side of BufferQueue

While currently untested, this should allow to move the
BuffereQueue in the consumer process and have everything
work as usual.

Bug: 9265647

Change-Id: I9ca8f099f7c65b9a27b7e7a3643b46d1b58eacfc
/frameworks/native/include/gui/IGraphicBufferConsumer.h