summaryrefslogtreecommitdiffstats
path: root/libs/gui
Commit message (Collapse)AuthorAgeFilesLines
* Stop using default value for Surface producerControlledByApp parameterJesse Hall2013-09-161-5/+7
| | | | | Bug: 10785749 Change-Id: Ifbf9340e5eabe621a69e990ec3e05ac51f8db66a
* fix a few problems with BitTubeMathias Agopian2013-09-102-58/+68
| | | | | | | | | | | | | | | | BitTube used to send objects one at a time and didn't handle errors properly. We now send all the objects in one call, which means they have to be read as a single batch as well. This changes the BitTube API. Update SensorService to the new API. Also added an API to set the size of the send buffer. Bug: 10641596 Change-Id: I77c70d35e351fdba0416fae4b7ca3b1d56272251
* Sensor batching. Changes to the native code.Aravind Akella2013-09-033-16/+63
| | | | | Bug: 10109508 Change-Id: I7333f3aac76125a8226a4c99c901fb904588df04
* Force async behavior for the virtual display output BufferQueueJesse Hall2013-08-291-2/+4
| | | | | Bug: 10551087 Change-Id: I40bbb2b87d64420939a0ea309254f281437dab56
* Surface: Fix controlledByApp parameterEino-Ville Talvala2013-08-211-1/+1
| | | | | Bug: 10425641 Change-Id: I1a47e2ce4ecbdb8e67030a5d9ddf6604c5e2497d
* Fix buildAndy McFadden2013-08-191-1/+1
| | | | | | Neglected the "checkbuild"-built tests. Change-Id: I202692f1a6d1e306c88e820c959d07d16e7c6a00
* Re-enable frame dropping for non-auto timestampsAndy McFadden2013-08-164-4/+22
| | | | | | | | | | | | | | | 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
* gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquiredIgor Murashkin2013-08-141-1/+3
| | | | | | | | | | | - 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
* Fix build. optional tests were broken.Mathias Agopian2013-08-141-0/+3
| | | | Change-Id: Iba9f5cb57f134559e1f9c55e293578d9f5d8cb96
* SurfaceFlinger now uses GLES 2.x when availableMathias Agopian2013-08-131-5/+5
| | | | | | Bug: 8679321 Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
* make sure GLConsumer::releaseTexImage() works after detachFromContext()Mathias Agopian2013-08-121-19/+43
| | | | Change-Id: I27e0bc57e927d47b2b98113ee37b5396bcc72019
* make GLConsumer's debug texture staticMathias Agopian2013-08-081-22/+28
| | | | | | | this is so that we don't burn a gralloc handle and a bit of memory per GLConsumer. Change-Id: I30c3e7ec45d7f1b5426aca8e06c7716870877706
* Add ISurfaceComposer::destroyDisplayJesse Hall2013-08-082-13/+47
| | | | | Bug: 10191053 Change-Id: Ia89286f95421344a60ffedaaca5825c4e3cd7f9e
* don't hardcode debug texture dimensionsMathias Agopian2013-08-071-4/+7
| | | | Change-Id: I356333801d246a8cafb3e977a77dc7325e8b822d
* fix tests moreMathias Agopian2013-08-061-1/+1
| | | | Change-Id: I05c3dd6a22440844f8bd071f4c2b620b2bd8c720
* fix testsMathias Agopian2013-08-061-1/+1
| | | | Change-Id: I0f4d613481eda2c44a2d631a81d75de7e52e7a62
* remove support for glReadPixels screenshot pathMathias Agopian2013-08-062-9/+4
| | | | | | | this was only needed on some chipset we're not supporting in KLP. Change-Id: I2e8fc07f135030bd61d2e241a8e426f1a4316425
* Fix build. 3rd attemptMathias Agopian2013-08-061-1/+1
| | | | Change-Id: I4317b34fd07890ea7cf9db51be42d72ef21aca89
* All consumers now take an IGraphicBufferConsumer instead of a BufferQueueMathias Agopian2013-08-0611-51/+61
| | | | | | | | | | 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
* Merge "BufferQueue: Support query of consumer usage bits"Eino-Ville Talvala2013-08-052-0/+21
|\
| * BufferQueue: Support query of consumer usage bitsEino-Ville Talvala2013-07-302-0/+21
| | | | | | | | | | Bug: 9592202 Change-Id: I61a17758200e61adaca695b426db3df0f6637d4c
* | Merge "Roll back recent change"Andy McFadden2013-08-022-2/+4
|\ \
| * | Roll back recent changeAndy McFadden2013-08-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Disable dropping of frames based on timestamp. Resume auto- generating timestamps in Surface. Bug 10151804 Change-Id: I15de26158e1d7ef22a5b150e685a126dc48ae2b4
* | | Merge "Binderize the consumer side of BufferQueue"Mathias Agopian2013-08-027-13/+550
|\ \ \
| * | | Binderize the consumer side of BufferQueueMathias Agopian2013-08-017-13/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Drop frames based on presentation timestamp"Andy McFadden2013-08-022-31/+69
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | Drop frames based on presentation timestampAndy McFadden2013-08-012-31/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there are two or more buffers pending that are ready for immediate presentation, drop all but the last one. Any code that didn't explicitly specify timestamps for buffers was using the default value (auto-generated "now"). As a result, surfaceflinger would drop frames whenever more than one buffer was queued. We now use zero as the auto-generated timestamp, and we don't set the timestamp in eglBeginFrame(). Change-Id: I187f42d33de227cd3411ff0dcd3b9ce1961457eb
* | | log an error when dequeueBuffer gets a NULL FenceMathias Agopian2013-08-014-16/+20
|/ / | | | | | | | | Bug: 9858745 Change-Id: If35d6a7d770bf0a42d55bc55880a9ddb721fcfd0
* | Make Flattenable not virtualMathias Agopian2013-07-302-90/+97
|/ | | | | | | | | | | | | | | | | 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
* single buffer mode for BufferQueueMathias Agopian2013-07-262-10/+113
| | | | | Bug: 9891035 Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
* fix buildMathias Agopian2013-07-261-2/+0
| | | | Change-Id: I04df8ec96510b16e84054089f7c02609d8fe2b0c
* get rid of HAL pixelformats 5551 and 4444Mathias Agopian2013-07-261-2/+0
| | | | Change-Id: I39409103144c1ba09078c4ddc323a58987fb09ea
* Merge "Fix a race in BufferQueue"Mathias Agopian2013-07-251-17/+27
|\
| * Fix a race in BufferQueueMathias Agopian2013-07-231-17/+27
| | | | | | | | | | | | | | | | | | | | BufferQueue::dequeueBuffer() could incorrectly return WOULD_BLOCK while in "cannot block" mode if it happened while a consumer acquired the last allowed buffer before releasing the old one (which is a valid thing to do). Change-Id: I318e5408871ba85e068ea9ef4dc9b578f1bb1043
* | fix log messages and bogus error messageMathias Agopian2013-07-221-23/+18
|/ | | | | | | also assert when releasing a buffer and it has been queued Change-Id: I6f78d9ceb406ec85ff46c7b6d0c047b14063e3d0
* make sure to reset the framenumber when a buffer is marked FREEMathias Agopian2013-07-191-0/+3
| | | | Change-Id: Ic45929f35553de209801f74e8006fb1bf0b25b45
* Make ANW.setSwapInterval(0) work againMathias Agopian2013-07-195-50/+74
| | | | | | | | | | | 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
* BuffferQueue disconnect is now always asynchrnousMathias Agopian2013-07-182-57/+21
| | | | | | | | | | we tag queued buffers with the "bufferqueue cannot block" flag and use that bit to discard a buffer in the queue by new ones comming in. this allows us to remove the buffer queue drain in disconnect while maintaining the right behaviour if it gets connected again (since each buffer remembers how it was enqueued). Change-Id: I1e703d363a687b70b19ba49cef32213116e8bd3f
* BufferQueue improvements and APIs changesMathias Agopian2013-07-1813-188/+49
| | | | | | | | | | | | | | | | | | | | 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 consumersYing Wang2013-07-151-1/+2
| | | | | | to fix tests build. Change-Id: I70b9cf5b0d76df709e474181eeb7c42a54ecf43a
* always pass the BufferQueue explicitely to consumersMathias Agopian2013-07-127-14/+21
| | | | Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
* Pay attention to buffer timestampsAndy McFadden2013-07-106-37/+70
| | | | | | | | | | | | | | When acquiring a buffer, SurfaceFlinger now computes the expected presentation time and passes it to the BufferQueue acquireBuffer() method. If it's not yet time to display the buffer, acquireBuffer() returns PRESENT_LATER instead of a buffer. The current implementation of the expected-present-time computation uses approximations and guesswork. Bug 7900302 Change-Id: If9345611c5983a11a811935aaf27d6388a5036f1
* 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
* BufferQueue: remove freeAllBuffersExceptHeadLocked()Lajos Molnar2013-05-231-24/+5
| | | | | | | | | | Now that we are having separate buffer-instances for the buffer- queue, we can free all buffers; we don't have to keep the head alive. Change-Id: I023e9161a2501d99333f8868ce438afa914ec50f Signed-off-by: Lajos Molnar <lajos@google.com> Related-to-bug: 7093648
* BufferQueue: track buffer-queue by instance vs. by referenceLajos Molnar2013-05-235-88/+193
| | | | | | | | | | | | | | | | | | | Instead of representing the buffer-queue as a vector of buffer indices, represent them as a vector of BufferItems (copies). This allows modifying the buffer slots independent of the queued buffers. As part of this change, BufferSlot properties that are only been relevant in the buffer-queue have been removed. Also, invalid scalingMode in queueBuffer now returns an error. ConsumerBase has also changed to allow reuse of the same buffer slots by different buffers. Change-Id: If2a698fa142b67c69ad41b8eaca6e127eb3ef75b Signed-off-by: Lajos Molnar <lajos@google.com> Related-to-bug: 7093648
* am e6eef6c1: am ea74d3b7: make the warning timout of Fence::waitForever() ↵Mathias Agopian2013-05-174-5/+5
|\ | | | | | | | | | | | | implicit and longer * commit 'e6eef6c136b007f3a7e1e19884875b855c0c5f95': make the warning timout of Fence::waitForever() implicit and longer
| * make the warning timout of Fence::waitForever() implicit and longerMathias Agopian2013-05-164-5/+5
| | | | | | | | | | | | | | | | | | | | - timeout is now 3 seconds instead of 1 - simplifies the API a bit - allows us to change/tweak this timeout globaly Bug: 8988871 Change-Id: I8d3c6ec43a372f602fb3f29856710339f86c0ec9
* | am 87ab83d9: am f743e3db: Merge "Add support for ↵Eino-Ville Talvala2013-05-091-10/+35
|\ \ | |/ | | | | | | | | | | HAL_PIXEL_FORMAT_YCbCr_420_888" into jb-mr2-dev * commit '87ab83d96b9d826e94a7169a6205bcf9c2ee633a': Add support for HAL_PIXEL_FORMAT_YCbCr_420_888
| * Add support for HAL_PIXEL_FORMAT_YCbCr_420_888Eino-Ville Talvala2013-05-061-10/+35
| | | | | | | | | | | | | | | | | | - Add fields to CpuConsumer::LockedBuffer for new information - New lock methods for GraphicBuffer and GraphicBufferMapper for the format Bug: 8734880 Change-Id: If31f82c62d64b6942cf4cc6e5715585c03273f12
* | am 83ad8957: am 5b6ebd71: Merge "libgui_test: fix a couple minor test ↵Jamie Gennis2013-04-251-9/+2
|\ \ | |/ | | | | | | | | | | issues" into jb-mr2-dev * commit '83ad89579e22228c1a48a2a488b86fc0d41057a6': libgui_test: fix a couple minor test issues