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/BufferQueueCore.cpp
|
adf51bac81fa28637d00227a44d7b20ea035980a |
|
05-May-2016 |
Pablo Ceballos <pceballos@google.com> |
BQ: Fix segfault in dump() When dequeueBuffer() is called we put the slot in mActiveBuffers, then don't hold the BufferQueue lock while allocation occurs. So a slot might be in mActiveBuffers but not have a buffer attached yet. Prevent the dump function from segfaulting in this case. Bug 27128710 Change-Id: Ie1480c0f9b2544554fc3281045e55ad30605e6ec
/frameworks/native/libs/gui/BufferQueueCore.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/BufferQueueCore.cpp
|
3559fbf93801e2c0d9d8fb246fb9b867a361b464 |
|
17-Mar-2016 |
Pablo Ceballos <pceballos@google.com> |
Rename single buffer mode to shared buffer mode Change-Id: Id43d0737d9367981644e498942ebc0077d61038c
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
4782b268d54d737294de7b51bdff4ecda2f1c1f0 |
|
02-Mar-2016 |
Pablo Ceballos <pceballos@google.com> |
Merge "Revert "Revert "Partial revert of "Fix Surface slot caching"""" into nyc-dev
|
3827379b2e414b4c96793dd3555302638db02562 |
|
02-Mar-2016 |
Pablo Ceballos <pceballos@google.com> |
Revert "Revert "Partial revert of "Fix Surface slot caching""" This reverts commit 16c9c304a33af36faa352d32777bc48c50bf7b74. Change-Id: Icbdcba8a646ac40c0533c1c04f5b15769332976c
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
d8bb8da1b742c34e0d2c97cfd6d097b21df9bc47 |
|
29-Feb-2016 |
Pablo Ceballos <pceballos@google.com> |
Merge "Revert "Partial revert of "Fix Surface slot caching""" into nyc-dev
|
16c9c304a33af36faa352d32777bc48c50bf7b74 |
|
19-Feb-2016 |
Pablo Ceballos <pceballos@google.com> |
Revert "Partial revert of "Fix Surface slot caching"" This reverts commit 981066c3a5be3e4775b6537ef32268f7e108c912.
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
981066c3a5be3e4775b6537ef32268f7e108c912 |
|
18-Feb-2016 |
Pablo Ceballos <pceballos@google.com> |
Partial revert of "Fix Surface slot caching" - Partially reverts commit 789a0c82cb370d6b82f401cc130af58c85802cbf. - Leaves the fix in Surface, but reverts all changes to the Producer/Consumer listeners. Bug 27246023 Bug 27229287 Change-Id: I9283f9e59e666b5ae44c0db25f99a80d05eea3ee
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
789a0c82cb370d6b82f401cc130af58c85802cbf |
|
05-Feb-2016 |
Pablo Ceballos <pceballos@google.com> |
Fix Surface slot caching - Now that it's possible to resize a BufferQueue while buffers are dequeued/acquired, it's no longer correct for Surface to clear its cache when the BufferQueue is resized since it must keep at least the currently dequeued buffers. - Add an onSlotsFreed callback to IProducerListener so that producers that wish to be notified about buffers being freed can do so. Note that this isn't currently used in Surface. - Review and fixup all the places where the producer/consumer listeners for freed buffers should be called. Change-Id: I4ab0c92bc69b75a3c072ddf5d74d78f941dba4c8
/frameworks/native/libs/gui/BufferQueueCore.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/BufferQueueCore.cpp
|
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/libs/gui/BufferQueueCore.cpp
|
9e314337cdc65b1fbf52060e9a6a4ddf2215c352 |
|
12-Jan-2016 |
Pablo Ceballos <pceballos@google.com> |
BQ: Conditionally compile validateConsistencyLocked - Only enable it on userdebug and eng builds so that it won't slow down user builds. Change-Id: I70933a23d54657fdf5cbc23873da4fbee84b9a26
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
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/libs/gui/BufferQueueCore.cpp
|
70982a5f95f68295244e5f6cc037c193713a5259 |
|
12-Jan-2016 |
Dan Stoza <stoza@google.com> |
Revert "libgui: Remove custom BufferQueue allocators" This reverts commit acd56150573d3a6d449c0de01f93c6f269d121e3. Change-Id: I877f63a57fbddb4dcff71b3909b460ecc05981eb
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
acd56150573d3a6d449c0de01f93c6f269d121e3 |
|
08-Jan-2016 |
Dan Stoza <stoza@google.com> |
libgui: Remove custom BufferQueue allocators Removes the ability to set a custom GraphicBuffer allocator for a BufferQueue. Custom-allocated buffers may still be used through the attachBuffer call. Change-Id: I127bdfb496fc089a61c7e266c8bd2b906d41f32e
/frameworks/native/libs/gui/BufferQueueCore.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/BufferQueueCore.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/BufferQueueCore.cpp
|
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/libs/gui/BufferQueueCore.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/BufferQueueCore.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/BufferQueueCore.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/BufferQueueCore.cpp
|
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/libs/gui/BufferQueueCore.cpp
|
79e287890da9de37a834cceebdefe32a7d3ac0ac |
|
04-May-2015 |
Dan Stoza <stoza@google.com> |
Merge "libgui: Clear frame number while freeing slot" into mnc-dev
|
52937cd9a543fe66696c38ae50ec141aa70ec1e4 |
|
02-May-2015 |
Dan Stoza <stoza@google.com> |
libgui: Clear frame number while freeing slot Clears the frame number of a slot when it is freed, since it is used to determine if a released buffer is stale. Bug: 20445852 Change-Id: I02415e7b25a1eafe7414d6eb1cedf62ac5543cd9
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
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/libs/gui/BufferQueueCore.cpp
|
4afd8b67f9be307e6c6ed89deab2e85516bb3a0e |
|
26-Feb-2015 |
Dan Stoza <stoza@google.com> |
BufferQueue: Add NATIVE_WINDOW_BUFFER_AGE query Adds a NATIVE_WINDOW_BUFFER_AGE query, which returns the age of the contents of the most recently dequeued buffer as the number of frames that have elapsed since it was last queued. Change-Id: Ib6fd62945cb62d1e60133a65beee510363218a23 (cherry picked from commit 49f810c72df8d1d64128e376757079825c8decd4)
/frameworks/native/libs/gui/BufferQueueCore.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/BufferQueueCore.cpp
|
0de7ea752900b5da29ad19c2799040235477f3c5 |
|
23-Apr-2015 |
Dan Stoza <stoza@google.com> |
libgui: Change BufferQueue to use free lists BufferQueue used to choose free buffers by scanning through its array of slots and picking one based on timestamp. This changes that mechanism to use a pair of free lists: one with buffers attached and one without. This makes it easier to choose either type of free slot depending on the needs of the current operation. Fixes an issue with the first version of this change, found in bugs 20482952, 20443314, and 20464549. Bug: 13175420 Change-Id: I9b6e83cfe8f9b4329a976025cb8e291d51fb6d4a
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
1fc9cc25a487d4d9dea3cc185331e3481ead36ff |
|
22-Apr-2015 |
Dan Stoza <stoza@google.com> |
Revert "libgui: Change BufferQueue to use free lists" This reverts commit 8dddc990103b71137be2a6365a26b1ac36598e68. Change-Id: I0b0fed9f1394c6f6ae812f6c562ead4473a8226e
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
8dddc990103b71137be2a6365a26b1ac36598e68 |
|
17-Apr-2015 |
Dan Stoza <stoza@google.com> |
libgui: Change BufferQueue to use free lists BufferQueue used to choose free buffers by scanning through its array of slots and picking one based on timestamp. This changes that mechanism to use a pair of free lists: one with buffers attached and one without. This makes it easier to choose either type of free slot depending on the needs of the current operation. Bug: 13175420 Change-Id: Ic8398e7511bd11a60a1c82e3ad2ee271c9822be1
/frameworks/native/libs/gui/BufferQueueCore.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/BufferQueueCore.cpp
|
78014f32da6d0ebf52fb34ebb7663863000520a0 |
|
16-Jul-2014 |
Antoine Labour <piman@google.com> |
BufferQueue: release mutex while allocating. DO NOT MERGE BufferQueueProducer::allocateBuffers used to keep the BufferQueueCore mutex while doing the buffer allocation, which would cause the consumer (which also needs the mutex) to block if the allocation takes a long time. Instead, release the mutex while doing the allocation, and grab it again before filling the slots. Keep a bool state and a condvar to prevent other producers from trying to allocate the slots while the mutex is released. Bug: 11792166 Change-Id: I4ab1319995ef892be2beba892f1fdbf50ce0416d (cherry picked from commit ea96044470a29133321c681080870b9d31f81a19)
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
8f515ce1c57379cafac4357bc4fdb61dd346ec5f |
|
09-Jun-2014 |
Mark Salyzyn <salyzyn@google.com> |
libgui: 64 bit compile issues (part deux) - nsecs_t printed with PRId64 - int64_t/uint64_t print issues - some size_t printing issues. - missing argument to BQ_LOGV Change-Id: I493f2b578e801dc38c44f8c536faa45266720402
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
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/libs/gui/BufferQueueCore.cpp
|
fd34b65f717b84fa06d8c37f41b070f41d0ad3a3 |
|
11-Apr-2014 |
Dan Stoza <stoza@google.com> |
Merge "BufferQueue: Add producer buffer-released callback"
|
cece164b23dbb368de1be2112827dd2df0ab2b5c |
|
04-Apr-2014 |
Mark Salyzyn <salyzyn@google.com> |
native gui: 64-bit compile issues Change-Id: I45f605ff3759fb7ae9f0a6425d557d195f93281e
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
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/BufferQueueCore.cpp
|
3e96f1982fda358424b0b75f394cbf7c1794a072 |
|
03-Mar-2014 |
Dan Stoza <stoza@google.com> |
Change BufferQueue into producer/consumer wrapper Now that BufferQueue has been split into core + producer + consumer, rewrite BufferQueue to be a thin layer over a producer and consumer interface. Eventually, this layer will be deprecated in favor of only using either the producer or consumer interface, as applicable. Change-Id: I340ae5f5b633b244fb594615ff52ba50b9e2f7e4
/frameworks/native/libs/gui/BufferQueueCore.cpp
|
289ade165e60b5f71734d30e535f16eb1f4313ad |
|
28-Feb-2014 |
Dan Stoza <stoza@google.com> |
Split BufferQueue into core + producer + consumer Change-Id: Idc39f1e511d68ce4f02202d35425a419bc0bcd92
/frameworks/native/libs/gui/BufferQueueCore.cpp
|