summaryrefslogtreecommitdiffstats
path: root/include/gui/CpuConsumer.h
Commit message (Collapse)AuthorAgeFilesLines
* Refactor ConsumerBase and it's derived classes.Michael Lentine2015-05-181-17/+0
| | | | | | | | | | Move setDefaultBufferSize, setDefaultBufferFormat, and setDefaultBufferDataSpace into ConsumerBase and remove them from CpuConsumer and BufferItemConsumer. Bug: 19977701 Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b
* Revert "libgui: Plumb attach/detach through CpuConsumer"Dan Stoza2015-04-021-14/+0
| | | | This reverts commit 20c5672883796c0dedf38f51dc2fc6f140b09ae6.
* libgui: Plumb attach/detach through CpuConsumerDan Stoza2015-03-171-0/+14
| | | | | | | | Adds CpuConsumer::{detachNextBuffer,attachAndReleaseBuffer}, which can be used to more carefully manage the ownership of GraphicBuffers. Bug: 19628705 Change-Id: Ia7a7e30da6d81eb2367241998f14988db0afc3bf
* Revert "libgui: Plumb attach/detach through CpuConsumer"Dan Stoza2015-03-171-14/+0
| | | | | | This reverts commit 43078e2827211139f0614719c920f3c5bff6c3fa. Change-Id: Ifef774d9922bb90450384e810e4767b56cc29de3
* libgui: Plumb attach/detach through CpuConsumerDan Stoza2015-03-161-0/+14
| | | | | | | | Adds CpuConsumer::{detachNextBuffer,attachAndReleaseBuffer}, which can be used to more carefully manage the ownership of GraphicBuffers. Bug: 19628705 Change-Id: Ia7aa1ac59c2f768f2d8a0f35ad23067936a7427c
* Add dataSpace to buffer queues; remove old format enums.Eino-Ville Talvala2015-03-041-0/+7
| | | | | | | | | | | | | - 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
* Merge commit 'ec41d55b8d018f349f7687cfe491651db600b51d'Chad Jones2015-01-291-2/+6
|\
| * CpuConsumer: lock buffers that could be YUV as ycbcrLajos Molnar2015-01-281-2/+6
| | | | | | | | | | Bug: 17906609 Change-Id: Ic71af69ec3b19ab1224ed3ad5e0a97c60e81cda6
* | libgui: Enable -Weverything and -WerrorDan Stoza2014-12-051-8/+7
|/ | | | | | | Enables -Weverything and -Werror, with just a few exceptions for warnings we can't (or shouldn't need to) work around. Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
* gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquiredIgor Murashkin2013-08-141-1/+1
| | | | | | | | | | | - Return NOT_ENOUGH_DATA instead of INVALID_OPERATION when too many buffers have already been locked. - INVALID_OPERATION is nominally used when something irrecoverable happens, but in this case the client just needs to call unlockBuffer to go back into a good state. Bug: 10333400 Change-Id: I3a034d77de85741429f832a90eedd670afa1dc94
* All consumers now take an IGraphicBufferConsumer instead of a BufferQueueMathias Agopian2013-08-061-3/+1
| | | | | | | | | | 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
* BufferQueue improvements and APIs changesMathias Agopian2013-07-181-1/+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
* always pass the BufferQueue explicitely to consumersMathias Agopian2013-07-121-1/+4
| | | | Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
* CpuConsumer: Add set buffer size and format functions.Zhijun He2013-06-101-0/+12
| | | | | | | | Add setDefaultBufferSize() and setDefaultBufferFormat(). ImageReader JNI need them. Bug: 9254294 Change-Id: I7d2464d43b0ca73fbb834ed22cecbfbb30eef60c
* CpuConsumer: Remove CpuConsumer JNI ID.Zhijun He2013-06-031-1/+0
| | | | | | | Not used anywhere, and it is pretty confusing to have it here. Bug: 9254294 Change-Id: I12b761532918b546a0f56c74ccf81b2c119ccd66
* Add support for HAL_PIXEL_FORMAT_YCbCr_420_888Eino-Ville Talvala2013-05-061-0/+8
| | | | | | | | | - Add fields to CpuConsumer::LockedBuffer for new information - New lock methods for GraphicBuffer and GraphicBufferMapper for the format Bug: 8734880 Change-Id: If31f82c62d64b6942cf4cc6e5715585c03273f12
* CpuConsumer: Properly track acquired buffersEino-Ville Talvala2013-03-051-5/+16
| | | | | | | | | | | | | | CpuConsumer cannot simply assume a slot's buffer is the same buffer between acquire and release, and therefore it could be possible for the same slot to get used for a second acquired buffer, if there's a producer disconnect in between. This would cause a problem when the first buffer is released by the consumer. Instead, use an independent list of acquired buffers to properly track their state. Bug: 8291751 Change-Id: I0241ad8704e53d47318c7179b13daed8181b1fab
* CpuConsumer: Add optional asynchronous modeEino-Ville Talvala2013-02-281-1/+1
| | | | | | | Bug: 8290146 Bug: 8291751 Change-Id: I9c8ac4bff38b0411e987a204e540d018dba6d0b4
* CpuConsumer: Don't unlock buffers on producer disconnectEino-Ville Talvala2013-02-281-1/+5
| | | | | | Bug: 8291751 Change-Id: I062a3d34b41183d07fb6b9109cdb6bf0c0c75672
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-1/+1
| | | | | | | | | | 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
* Add BufferItemConsumer, a simple BufferQueue consumer.Eino-Ville Talvala2012-08-211-1/+3
| | | | | | | | | | | | | | BufferItemConsumer allows for acquiring BufferQueue's BufferItems, which contain all the data and metadata the BufferQueue has for a given graphics buffer. This consumer is useful when direct access to the native buffer_handles is needed by the client. Also includes a minor cleanup of CpuConsumer's use of 'virtual'. Bug: 6243944 Change-Id: If7dc4192b15ac499555f1eda42a85140f2434795
* CpuConsumer: inherit from ConsumerBaseEino-Ville Talvala2012-08-201-47/+6
| | | | Change-Id: I55178b1d673ffa0fbc6e63ef47642c64d4d03228
* Add a BufferQueue CPU consumer.Eino-Ville Talvala2012-05-141-0/+142
Aimed for use cases where gralloc buffers need to be consumed by CPU users, such as camera image data streams. The CpuConsumer is a synchronous queue, which exposes raw pointers to the underlying graphics buffers to applications. Multiple buffers may be acquired at once, up to the limit set at time of construction. Change-Id: If1d99f12471438e95a69696e40685948778055fd