summaryrefslogtreecommitdiffstats
path: root/include/gui/IGraphicBufferProducer.h
Commit message (Collapse)AuthorAgeFilesLines
* libgui/SurfaceFlinger: Add getConsumerNameDan Stoza2015-06-081-0/+3
| | | | | | | | | 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
* Revert "libgui: Add getConsumerName"Dan Stoza2015-06-081-3/+0
| | | | | | This reverts commit 107fbe5599016b0e35145a1a00c4f238b63d61e4. Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
* libgui: Add getConsumerNameDan Stoza2015-06-051-0/+3
| | | | | | | | | 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
* libgui: Add generation numbers to BufferQueueDan Stoza2015-06-031-2/+12
| | | | | | | | | | | | | | | 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
* libgui: Allow an IGBProducer to disable allocationDan Stoza2015-04-231-0/+12
| | | | | | | | | | | | | | 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
* libgui: Pass surface damage through BufferQueueDan Stoza2015-04-151-1/+6
| | | | | | | | | | 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
* DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.Eino-Ville Talvala2015-03-191-7/+13
| | | | | | | | | | | | | | | - 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
* libgui: Enable -Weverything and -WerrorDan Stoza2015-03-181-5/+3
| | | | | | | | | | | | | 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
* Add sticky transform to surfaceflinger.Ruben Brunk2014-07-141-4/+11
| | | | | | | | | | 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
* BufferQueue: Add allocateBuffers methodDan Stoza2014-06-201-0/+13
| | | | | | | | | | | | | | 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
* BufferQueueProducer: add detachNextBufferDan Stoza2014-04-151-0/+21
| | | | | | | | | | 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
* BufferQueue: Add producer buffer-released callbackDan Stoza2014-03-311-4/+7
| | | | | | | | | | | | | | | | | 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
* Merge "Add sideband streams to BufferQueue and related classes"Jesse Hall2014-03-131-0/+13
|\
| * Add sideband streams to BufferQueue and related classesJesse Hall2014-03-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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-6/+51
|/ | | | | | | | | | 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: Add tests for IGraphicBufferProducerIgor Murashkin2013-11-211-3/+8
| | | | | | | * Basic tests only. Needs more complicated queue/dequeue tests. * Also needs consumer-side tests to really be thorough. Change-Id: I1099dd56d65b6e9dfa15377726d6054ce657c0ca
* gui: Update header docs for IGraphicBufferConsumer/Producer/BufferQueueIgor Murashkin2013-11-131-25/+163
| | | | | | Also fix compiler warnings for libgui Change-Id: I0ee38d9ad5eaa82d55bf812d291da8c433581cef
* Make sure do disconnect from a BQ when its client dies.Mathias Agopian2013-09-161-2/+5
| | | | | | Bug: 5679534 Change-Id: If447e8673df83fe0b1d6210641e0a48522501a53
* Re-enable frame dropping for non-auto timestampsAndy McFadden2013-08-161-6/+9
| | | | | | | | | | | | | | | 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
* Make Flattenable not virtualMathias Agopian2013-07-301-8/+7
| | | | | | | | | | | | | | | | | 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
* Make ANW.setSwapInterval(0) work againMathias Agopian2013-07-191-5/+12
| | | | | | | | | | | 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
* BufferQueue improvements and APIs changesMathias Agopian2013-07-181-8/+1
| | | | | | | | | | | | | | | | | | | | 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
* Fix argument types in IGraphicBufferProducer methodsJesse Hall2013-03-181-2/+2
| | | | | Bug: 8384764 Change-Id: I7a3f1e1a0584a70af04f9eafef900505389d2202
* Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-141-2/+2
| | | | Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
* Minor tweaks.Andy McFadden2013-01-081-10/+9
| | | | Change-Id: I9f82f574112141b6aa074c42303056cd52d5c478
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-0/+219
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