History log of /frameworks/native/libs/gui/IGraphicBufferProducer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
eb7980c224a54f860b7af5ecf30cbc633ae41289 28-Jun-2016 Pablo Ceballos <pceballos@google.com> BQ: Add and expose a unique id

Bug 29422927

Change-Id: I80eab94f073ebc378302f00fa86a740c3643657e
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
1a61da5e28fa16ad556a58193c8bbeb32a5f636d 28-Apr-2016 John Reck <jreck@google.com> Return the transform to apply in getLastQueuedBuffer

Bug: 28428955
Change-Id: Id48f7d3bf3f5deb074cf0a6a52a41caac875db41
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
ce8e5df3c11616f3eb7867ce89558b530651166c 28-Apr-2016 John Reck <jreck@google.com> Don't flatten nullptrs

Bug: 28428970

BufferQueueProducer can return a nullptr for
the GraphicBuffer if there's nothing queued, which
IGraphicBufferProducer would attempt to flatten.

It's useful to distinguish that there's nothing queued
instead of just generic error, so fix IGraphicBufferProducer
to handle null GraphicBuffers.

Change-Id: I9e2b11e107e093d209a89a01d14feec3e885f268
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
50101d02a8eae555887282a5f761fdec57bdaf30 08-Apr-2016 Dan Stoza <stoza@google.com> libgui: Add getLastQueuedBuffer to BufferQueue

Adds the ability to get the last buffer queued to a BufferQueue plus
its acquire fence.

Bug: 27708453
Change-Id: Iee39475740b40c854a5f46178b2934fd930e61b8
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
59d12e90ae09171fc8b50fd8fd02e3247c04840c 28-Mar-2016 Pablo Ceballos <pceballos@google.com> Merge "Rename single buffer mode to shared buffer mode" into nyc-dev
413dc41e1d310834ace8a24f835b3af2ee86180f 18-Mar-2016 Pablo Ceballos <pceballos@google.com> BQ: fix some uninitialized variables am: 93c617f am: f16b857 am: 1ed2469 am: 46da938 am: b2428c7 am: ce3faa0
am: 6c42071

* commit '6c42071f84c450a884c72d38a44ab3f45dd16343':
BQ: fix some uninitialized variables
46da9385ad96fb1c2baab64fdea01eb3b0b41dd0 18-Mar-2016 Pablo Ceballos <pceballos@google.com> BQ: fix some uninitialized variables am: 93c617f am: f16b857
am: 1ed2469

* commit '1ed24698aa431aa4c3198fa3b8e830f1c29812a6':
BQ: fix some uninitialized variables
1ed24698aa431aa4c3198fa3b8e830f1c29812a6 18-Mar-2016 Pablo Ceballos <pceballos@google.com> BQ: fix some uninitialized variables am: 93c617f
am: f16b857

* commit 'f16b85752d7344814663c658175cce1a933e976b':
BQ: fix some uninitialized variables
3559fbf93801e2c0d9d8fb246fb9b867a361b464 17-Mar-2016 Pablo Ceballos <pceballos@google.com> Rename single buffer mode to shared buffer mode

Change-Id: Id43d0737d9367981644e498942ebc0077d61038c
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
93c617fd2a5e7910e0ba5c0ed6da152d30920679 16-Mar-2016 Pablo Ceballos <pceballos@google.com> BQ: fix some uninitialized variables

Bug 27555981
Bug 27556038

Change-Id: I436b6fec589677d7e36c0e980f6e59808415dc0e
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
ff95aabbcc6e8606acbd7933c90eeb9b8b382a21 14-Jan-2016 Pablo Ceballos <pceballos@google.com> Add interface for controlling single buffer auto refresh

- Adds a boolean to BufferQueue that controls whether or not auto
refresh is enabled in SurfaceFlinger when in single buffer mode.
- Adds plumbing up to ANativeWindow.
- When enabled, it will cache the shared buffer slot in Surface in
order to prevent the Binder transaction with SurfaceFlinger.

Bug 24940410

Change-Id: I83142afdc00e203f198a32288f071d926f8fda95
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
8af07499231374a259033c009a1616590ac34322 15-Jan-2016 Robert Shih <robertshih@google.com> IGraphicBufferProducer: fix QUEUE_BUFFER info leak am: d06421fd37 am: 413318311c am: dc9ec35294 am: 9d959e2755 am: edb7c81a1b am: 2a7a1247cb am: 40ba03fc68 am: ea2b6c68e1 am: 6df23e81f7 am: c748125025
am: db5c5bb025

* commit 'db5c5bb0259fa024517d9a151726785facba4f02':
IGraphicBufferProducer: fix QUEUE_BUFFER info leak
2a7a1247cb4829daaaa4e6a6ee3e670cd2f068bf 15-Jan-2016 Robert Shih <robertshih@google.com> IGraphicBufferProducer: fix QUEUE_BUFFER info leak am: d06421fd37 am: 413318311c am: dc9ec35294 am: 9d959e2755
am: edb7c81a1b

* commit 'edb7c81a1b99d2456910b03db9e4ac250eac2fab':
IGraphicBufferProducer: fix QUEUE_BUFFER info leak
edb7c81a1b99d2456910b03db9e4ac250eac2fab 15-Jan-2016 Robert Shih <robertshih@google.com> IGraphicBufferProducer: fix QUEUE_BUFFER info leak am: d06421fd37 am: 413318311c am: dc9ec35294
am: 9d959e2755

* commit '9d959e275561bcace3aab1f9df009c6c880003fa':
IGraphicBufferProducer: fix QUEUE_BUFFER info leak
dc9ec35294b8ec6b6c349b826edc9b44f4ddb96d 15-Jan-2016 Robert Shih <robertshih@google.com> IGraphicBufferProducer: fix QUEUE_BUFFER info leak am: d06421fd37
am: 413318311c

* commit '413318311c8cc356dd7e0837ce26e937a9f4c56a':
IGraphicBufferProducer: fix QUEUE_BUFFER info leak
413318311c8cc356dd7e0837ce26e937a9f4c56a 15-Jan-2016 Robert Shih <robertshih@google.com> IGraphicBufferProducer: fix QUEUE_BUFFER info leak
am: d06421fd37

* commit 'd06421fd37fbb7fd07002e6738fac3a223cb1a62':
IGraphicBufferProducer: fix QUEUE_BUFFER info leak
d06421fd37fbb7fd07002e6738fac3a223cb1a62 12-Jan-2016 Robert Shih <robertshih@google.com> IGraphicBufferProducer: fix QUEUE_BUFFER info leak

Bug: 26338109
Change-Id: I8a979469bfe1e317ebdefa43685e19f9302baea8
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
127fc63e8a15366b4395f1363e8e18eb058d1709 30-Jun-2015 Dan Stoza <stoza@google.com> libgui: Add dequeue/attach timeout

Adds the ability to specify the timeout when dequeueBuffer or
attachBuffer block due to the lack of a free buffer/slot. By default,
these will block indefinitely (which is signified by a timeout of -1).

When a timeout (other than -1) is specified, non-blocking mode is
disabled and the given timeout will be used instead.

Bug: 25196773
Change-Id: I17fdbeebccb7c8d878703d758ac1209608258e61
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
ccdfd60d79a8b7f1ed6401d0f2e8e29166a10584 08-Oct-2015 Pablo Ceballos <pceballos@google.com> BQ: Add support for single buffer mode

- Adds a single buffer mode to BufferQueue. In this mode designate the
first dequeued buffer as the shared buffer. All calls to dequeue()
and acquire() will then return the shared buffer, allowing the
producer and consumer to share it.
- Modify the buffer slot state tracking. Add a new SHARED state for
the shared buffer in single buffer mode. Also track how many times
a buffer has been dequeued/queued/acquired as it's possible for a
shared buffer to be both dequeued and acquired at the same time, or
dequeued/acquired multiple times. This tracking is needed to know
when to drop the buffer out of the SHARED state after single buffer
mode has been disabled.
- Add plumbing for enabling/disabling single buffer mode from Surface.

Bug 24940410

Change-Id: I3fc550c74bacb5523c049a227111356257386853
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
7dde599bf1a0dbef7390d91c2689d506371cdbd7 22-May-2015 Dan Stoza <stoza@google.com> Support SurfaceView synchronization.

Add API for fetching the next frame number to be produced by
a given buffer producer. Add an API to SurfaceComposer to
defer execution of the current transaction until a given frame number.
Together these may be used to synchronize app drawing and surface
control updates.

Change-Id: I8e0f4993332ac0199c768c88581a453fefbaff1d
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
69412a51f58fa9450f1cb077c8d4b6410128d993 25-Sep-2015 Naveen Leekha <leekha@google.com> am c4bd7211: resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev

* commit 'c4bd7211373cf5b745c7d4f849f43f7a2d2b1141':
resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
c4bd7211373cf5b745c7d4f849f43f7a2d2b1141 25-Sep-2015 Naveen Leekha <leekha@google.com> resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev

Change-Id: I543df164076b44578b14d41031800bb62b81586d
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
567dbbb6dd42be5013fcde0dadb3316d85f2fa0d 27-Aug-2015 Pablo Ceballos <pceballos@google.com> BQ: get rid of async in producer interface

- Get rid of the async flag in dequeueBuffer, allocateBuffers,
waitForFreeSlotThenRelock, and QueueBufferInput.
- Instead use the persistent flags mDequeueBufferCannotBlock and
mAsyncMode to determine whether to use the async behavior.

Bug 13174928

Change-Id: Ie6f7b9e46ee3844ee77b102003c84dddf1bcafdd
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
571e27e20e30560985d7c3a3ba8885693695b0fc 25-Sep-2015 Naveen Leekha <leekha@google.com> am e889592e: am 73887c08: am b414255f: Initialize local variables to avoid data leak

* commit 'e889592e33891c9b88ff6ba655426118f8ef12ee':
Initialize local variables to avoid data leak
e889592e33891c9b88ff6ba655426118f8ef12ee 25-Sep-2015 Naveen Leekha <leekha@google.com> am 73887c08: am b414255f: Initialize local variables to avoid data leak

* commit '73887c0864c9a928db6f66bd48c5aea4d31d9a8b':
Initialize local variables to avoid data leak
18165848e86feab8656bfdac3173bccf45a9a6df 25-Sep-2015 Naveen Leekha <leekha@google.com> am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak

* commit 'e2c4f4fb8b34e36a4f2760f3812c942604cabfb6':
Initialize local variables to avoid data leak
e2c4f4fb8b34e36a4f2760f3812c942604cabfb6 25-Sep-2015 Naveen Leekha <leekha@google.com> am c1e6fbb5: Initialize local variables to avoid data leak

* commit 'c1e6fbb52c3f85cc7610d1d07d12be38f70b4ed4':
Initialize local variables to avoid data leak
b414255f53b560a06e642251535b019327ba0d7b 23-Sep-2015 Naveen Leekha <leekha@google.com> Initialize local variables to avoid data leak

The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Partial manual merge of master change
12ba0f57d028a9c8f4eb3afddc326b70677d1e0c. Rest
to automerge from klp-dev)

For b/23696300

Change-Id: I704c9fab327b3545c58e8a9a96ac542eb7469c2a
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
c1e6fbb52c3f85cc7610d1d07d12be38f70b4ed4 23-Sep-2015 Naveen Leekha <leekha@google.com> Initialize local variables to avoid data leak

The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Manual merge of master change
12ba0f57d028a9c8f4eb3afddc326b70677d1e0c )

For b/23696300

Change-Id: I665212d10da56f0803b5bb772d14c77e632ba2ab
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
68b88fc14f3915cfa8d0f1849caab333aa469f61 22-Sep-2015 Naveen Leekha <leekha@google.com> Merge "Initialize local variables to avoid data leak"
12ba0f57d028a9c8f4eb3afddc326b70677d1e0c 22-Sep-2015 Naveen Leekha <leekha@google.com> Initialize local variables to avoid data leak

The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

For b/23696300

Change-Id: Ie37a34851ffe203f9579f63f1fe1b8605a880c30
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
583b1b32191992d6ada58b3c61c71932a71c0c4b 04-Sep-2015 Pablo Ceballos <pceballos@google.com> BQ: Prevent operations on disconnected BQs

- Update unit tests to match

Bug 23763412

Change-Id: I77e59bf6b57b328433c3835450455f80a8fa454b
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
e5b755a045f4203fdd989047441259893c6fbe2d 14-Aug-2015 Pablo Ceballos <pceballos@google.com> BQ: Get rid of setBufferCount

- Remove setBufferCount from BufferQueueProducer and
IGraphicsBufferQueueProducer.
- Get rid of the unit tests for it.
- In Surface, convert setBufferCount calls into calls to
setMaxDequeuedBufferCount.
- Change mOverrideMaxBufferCount to a boolean since it can now be
derived from mMaxAcquiredBufferCount, mMaxDequeuedBufferCount, and
mAsyncMode.

Bug 13174928

Change-Id: Ia0adc737fae9e13f186df832b8428a0829041bf9
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
fa455354557f6283ff3a7d76979e52fd251c155f 13-Aug-2015 Pablo Ceballos <pceballos@google.com> BQ: add setMaxDequeuedBufferCount

Adds the new setMaxDequeuedBufferCount() function to
BufferQueueProducer. This will eventually replace setBufferCount.

Also add setAsyncMode.

Bug 13174928

Change-Id: Iea1adcd5d74a75f67d8e9dde06d521695628ad5a
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
c6f30bdee1f634eb90d68cb76efe935b6535a1e8 08-Jun-2015 Dan Stoza <stoza@google.com> libgui/SurfaceFlinger: Add getConsumerName

Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is update on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
a2ca9bf0a9789e9e5e37961ebfb356347f59309e 08-Jun-2015 Dan Stoza <stoza@google.com> Revert "libgui: Add getConsumerName"

This reverts commit 107fbe5599016b0e35145a1a00c4f238b63d61e4.

Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
107fbe5599016b0e35145a1a00c4f238b63d61e4 06-Jun-2015 Dan Stoza <stoza@google.com> libgui: Add getConsumerName

Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is updated on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: Ife94bd89023fe7c00bad916932b9a19233fd2290
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
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/libs/gui/IGraphicBufferProducer.cpp
9de7293b0a1b01ebe6fb1ab4a498f144adc8029f 17-Apr-2015 Dan Stoza <stoza@google.com> libgui: Allow an IGBProducer to disable allocation

Adds a new method IGBP::allowAllocation, which controls whether
dequeueBuffer is permitted to allocate a new buffer. If allocation is
disallowed, dequeueBuffer will block or return an error as it
normally would (as controlled by *ControlledByApp).

If there are free buffers, but they are not of the correct dimensions,
format, or usage, they may be freed if a more suitable buffer is not
found first.

Bug: 19801715
Change-Id: I0d604958b78b2fd775c2547690301423f9a52165
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
5065a55291b67f584d7b0be3fa3cfc4e29a3cd1c 18-Mar-2015 Dan Stoza <stoza@google.com> libgui: Pass surface damage through BufferQueue

This change adds support for passing surface damage all of the way
down from the EGL interface through the consumer side of the
BufferQueue. Depends on system/core change
Ie645e6a52b37b5c1b3be19481e8348570d1aa62c

Bug: 11239309
Change-Id: I4457ea826e9ade4ec187f973851d855b7b93a31b
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
82c6bcc9705eabcaf5b9e45bc81867b0e2d61a02 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE 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

Cherry pick of I070bd2e7c56506055c419004c29e2e3feac725df

Change-Id: I461952389c18051176c6b75e664f20ad369f5760
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
3be1c6b60a188dc10025e2ce156c11fac050625d 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.

Cherry pick of I034abec27bf4020d84af60d7acc1939c59986dd6 plus a
couple of minor changes to CpuConsumer.cpp to make it work with a
prior change:
Uncomment CC_LOGV on line 46
Change C-style cast to static_cast on line 71

Change-Id: Iaec610477ea0122317b0578fb74caf2383d4cf08
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
097ca275f4717a2c47a5d49f302ed2b72c8a1370 14-Nov-2014 Marco Nelissen <marcone@google.com> Replace IInterface::asBinder() with a static

so we can do NULL checks again, and update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
1681d95989271f3a9ac0dbb93d10e4a29f2b4444 28-Jun-2014 Ruben Brunk <rubenbrunk@google.com> Add sticky transform to surfaceflinger.

Bug: 15116722

- Adds a sticky transform field that can be set from a
SurfaceFlinger client Surface. This transform is
added to any transform applied to the Surface.

Change-Id: Idaa4311dfd027b2d2b8ea5e2c6cba2da5779d753
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
29a3e90879fd96404c971e7187cd0e05927bbce0 20-Jun-2014 Dan Stoza <stoza@google.com> BufferQueue: Add allocateBuffers method

This adds an allocateBuffers method to BufferQueue, which instructs
it to allocate up to the maximum number of buffers allowed by the
current configuration. The goal is that this method can be called
ahead of render time, which will prevent dequeueBuffers from blocking
in allocation and inducing jank.

This interface is also plumbed up to the native Surface (and, in
another change, up to the Java Surface and ThreadedRenderer).

Bug: 11792166
Change-Id: I4aa96b4351ea1c95ed5db228ca3ef98303229c74
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
d9822a3843017444364899afc3c23fb5be6b9cb9 28-Mar-2014 Dan Stoza <stoza@google.com> BufferQueueProducer: add detachNextBuffer

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
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
fd34b65f717b84fa06d8c37f41b070f41d0ad3a3 11-Apr-2014 Dan Stoza <stoza@google.com> Merge "BufferQueue: Add producer buffer-released callback"
f0eaf25e9247edf4d124bedaeb863f7abdf35a3e 21-Mar-2014 Dan Stoza <stoza@google.com> BufferQueue: Add producer buffer-released callback

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
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
0ec54e156bed93d59900b742c8e9adcfaee90612 21-Mar-2014 Wonsik Kim <wonsik@google.com> Declare ownership of native_handle_t object

Change-Id: I4e21ff8ea76cfafce943dc059c8f72b42397980e
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
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/libs/gui/IGraphicBufferProducer.cpp
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/libs/gui/IGraphicBufferProducer.cpp
3f342c113360eacc1e9c1ff481cb03f700a50117 17-Sep-2013 Mathias Agopian <mathias@google.com> am 02b62df7: Merge "Make sure do disconnect from a BQ when its client dies." into klp-dev

* commit '02b62df7119b27c89d91d96938d8f4f5232b296b':
Make sure do disconnect from a BQ when its client dies.
365857df8b94c959dea984a63013f6e7730ef976 12-Sep-2013 Mathias Agopian <mathias@google.com> Make sure do disconnect from a BQ when its client dies.

Bug: 5679534

Change-Id: If447e8673df83fe0b1d6210641e0a48522501a53
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
30290a557e596c9bd58f99f9b8a3ea10bcbc8760 19-Aug-2013 Andy McFadden <fadden@android.com> am 90f59bf9: Merge "Re-enable frame dropping for non-auto timestamps" into klp-dev

* commit '90f59bf9eba79b27629505bc2709d84e7c811c8b':
Re-enable frame dropping for non-auto timestamps
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/libs/gui/IGraphicBufferProducer.cpp
771ed8d71be8c851991164cd10fcfbf2431df86d 13-Aug-2013 Jesse Hall <jessehall@google.com> am fc43e16a: Merge "Graphics:Add error check when create GraphicBuffer"

* commit 'fc43e16a5693bca0edfc82c650fb606971e47138':
Graphics:Add error check when create GraphicBuffer
2aff7025482cc40d2ebd45f81cdb318ac1c6f868 20-Nov-2012 Lingyun Zhu <lingyun.zhu@intel.com> Graphics:Add error check when create GraphicBuffer

Change-Id: Ib0ca59bf1dfe4ae0266c29c91c1dbe3d02c0904e
Author: Lingyun Zhu <lingyun.zhu@intel.com>
Signed-off-by: Lingyun Zhu <lingyun.zhu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 50141
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
ba93b3f8e403636b614a4a379f9421bc70dca84f 02-Aug-2013 Mathias Agopian <mathias@google.com> log an error when dequeueBuffer gets a NULL Fence

Bug: 9858745
Change-Id: If35d6a7d770bf0a42d55bc55880a9ddb721fcfd0
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
e142428a9c8b9d2380032cd4d7b55ee440fe8770 30-Jul-2013 Mathias Agopian <mathias@google.com> Make Flattenable not virtual

Fallout from the Flattenable change, update all its uses.

Additionnaly, fix/tighten size checks when (un)flatten()ing
things.

Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)

The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).

Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
7cdd786fa80cf03551291ae8feca7b77583be1c5 19-Jul-2013 Mathias Agopian <mathias@google.com> Make ANW.setSwapInterval(0) work again

we can now queue/dequeue a buffer in asynchrnous mode by using the
async parameter to these calls. async mode is only specified
with those calls (it is not modal anymore).

as a consequence it can only be specified when the buffer count
is not overidden, as error is returned otherwise.

Change-Id: Ic63f4f96f671cb9d65c4cecbcc192615e09a8b6b
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
595264f1af12e25dce57d7c5b1d52ed86ac0d0c9 17-Jul-2013 Mathias Agopian <mathias@google.com> BufferQueue improvements and APIs changes

this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:

- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
those flags are used to put the BufferQueue in a mode where it
will never block if both flags are set. This is achieved by:
- returning an error from dequeueBuffer() if it would block
- making sure a buffer is always available by replacing
the previous buffer with the new one in queueBuffer()
(note: this is similar to what asynchrnous mode used to be)

Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.

Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
4c00cc11141da7d159eb2323b186ed344115c0f1 16-Mar-2013 Jesse Hall <jessehall@google.com> Fix argument types in IGraphicBufferProducer methods

Bug: 8384764
Change-Id: I7a3f1e1a0584a70af04f9eafef900505389d2202
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
1df8c345854155cbbcb9f80de9d12d66ea70ac08 20-Dec-2012 Jamie Gennis <jgennis@google.com> libgui: disallow NULL Fence pointers

This change eliminates the uses of a NULL sp<Fence> indicating that no waiting
is required. Instead we use a non-NULL but invalid Fence object for which the
wait methods will return immediately.

Bug: 7892871
Change-Id: I5360aebe3090422ef6920d56c99fc4eedc642e48
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
466a192d2088f9238d34597d1aa28da41367c1ca 08-Jan-2013 Andy McFadden <fadden@android.com> Minor tweaks.

Change-Id: I9f82f574112141b6aa074c42303056cd52d5c478
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp
2adaf04fab35cf47c824d74d901b54094e01ccd3 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
/frameworks/native/libs/gui/IGraphicBufferProducer.cpp