summaryrefslogtreecommitdiffstats
path: root/libs/gui/IGraphicBufferConsumer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* BQ: fix some uninitialized variablesPablo Ceballos2016-03-251-1/+1
| | | | | | | Bug 27555981 Bug 27556038 Change-Id: I436b6fec589677d7e36c0e980f6e59808415dc0e
* IGraphicBufferConsumer: fix ATTACH_BUFFER info leakRobert Shih2016-01-221-1/+1
| | | | | Bug: 26338113 Change-Id: I019c4df2c6adbc944122df96968ddd11a02ebe33
* Fix PTS handling for buffer replacementDan Stoza2015-05-121-20/+5
| | | | | | | | | | | 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
* SurfaceFlinger: Fix PTS on stale buffersDan Stoza2015-05-011-0/+18
| | | | | | | | | | | | | | | | | | | | | 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)
* libgui: Implement onTransact for sideband streamsDan Stoza2015-04-281-0/+9
| | | | | | | | Implements the GET_SIDEBAND_STREAM case of IGraphicBufferConsumer::onTransact Change-Id: I46138b87ce2d70dde48b3561dcd378ce5fd8f383 (cherry picked from commit 17166698d935a004adab216aca83a585f91e9d96)
* libgui: Remove IGBC::BufferItemDan Stoza2015-03-161-172/+0
| | | | | | | | | Removes IGraphicBufferConsumer::BufferItem. Depends on the following changes: I187b3a7d05196b6289596afac8fb9a9d4aebff76 I0ddd38df37500cfd6b21d1e768ed14e39c5cd9fc Change-Id: Id1fa56d092188f2cb712768d5d2fc6a9027fb73c
* libgui: Add a BufferItem overload to IGBC::acquireDan Stoza2015-03-111-0/+16
| | | | | | | Adds an overload of IGraphicBufferConsumer::acquireBuffer which takes an android::BufferItem instead of an IGBC::BufferItem. Change-Id: I9c3bc8037fa9438d4d9080b8afb694219ef2f71f
* Add dataSpace to buffer queues; remove old format enums.Eino-Ville Talvala2015-03-041-0/+26
| | | | | | | | | | | | | - 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
* libgui: Enable -Weverything and -WerrorDan Stoza2014-12-051-34/+40
| | | | | | | Enables -Weverything and -Werror, with just a few exceptions for warnings we can't (or shouldn't need to) work around. Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
* Replace IInterface::asBinder() with a staticMarco Nelissen2014-11-141-1/+1
| | | | | | | so we can do NULL checks again, and update calls to IInterface::asBinder() to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
* Merge "BufferQueue: Increase max slots from 32 to 64"Dan Stoza2014-04-211-4/+8
|\
| * BufferQueue: Increase max slots from 32 to 64Dan Stoza2014-04-181-4/+8
| | | | | | | | | | | | | | | | 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
* | BufferQueue: Add StreamSplitterDan Stoza2014-04-151-6/+0
|/ | | | | | | | | 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
* Merge "Declare ownership of native_handle_t object"Wonsik Kim2014-04-021-1/+1
|\
| * Declare ownership of native_handle_t objectWonsik Kim2014-03-241-1/+1
| | | | | | | | Change-Id: I4e21ff8ea76cfafce943dc059c8f72b42397980e
* | BufferQueue: Test remote producer and consumerDan Stoza2014-03-211-11/+21
|/ | | | | | | | | 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
* Merge "Add sideband streams to BufferQueue and related classes"Jesse Hall2014-03-131-0/+16
|\
| * Add sideband streams to BufferQueue and related classesJesse Hall2014-03-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | BufferQueue: Allow detaching/reattaching buffersDan Stoza2014-03-101-0/+44
|/ | | | | | | | | | 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
* gui: Update header docs for IGraphicBufferConsumer/Producer/BufferQueueIgor Murashkin2013-11-131-1/+1
| | | | | | Also fix compiler warnings for libgui Change-Id: I0ee38d9ad5eaa82d55bf812d291da8c433581cef
* fix camera API 2.0 orientationMathias Agopian2013-09-171-2/+6
| | | | | | | | | 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
* Re-enable frame dropping for non-auto timestampsAndy McFadden2013-08-161-0/+4
| | | | | | | | | | | | | | | 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
* All consumers now take an IGraphicBufferConsumer instead of a BufferQueueMathias Agopian2013-08-061-1/+19
| | | | | | | | | | 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
* Binderize the consumer side of BufferQueueMathias Agopian2013-08-011-0/+459
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