summaryrefslogtreecommitdiffstats
path: root/libs/gui/tests
Commit message (Collapse)AuthorAgeFilesLines
* libgui/SurfaceFlinger: Add getConsumerNameDan Stoza2015-06-083-6/+47
| | | | | | | | | 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-083-47/+6
| | | | | | This reverts commit 107fbe5599016b0e35145a1a00c4f238b63d61e4. Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
* libgui: Add getConsumerNameDan Stoza2015-06-053-6/+47
| | | | | | | | | 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-032-0/+75
| | | | | | | | | | | | | | | 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
* Fix libgui crop matrix test.Michael Lentine2015-05-291-6/+23
| | | | | | | On devices that have the crop image extension the crop is not applied to the transform matrix so we have to expect different results in this case. Change-Id: If62dec1111fb77c9fa2c4332d121665960ce0216
* Fix libgui tests.Michael Lentine2015-05-222-8/+13
| | | | | | | | | | Update IGraphicsBufferProducerTest to the new maximum enum value which is now NATIVE_WINDOW_BUFFER_AGE. Update SurfaceTextureGLToGL_test to use the correct counts for GraphicsBuffer refs. Buf: 18138368 Change-Id: Ie2f7e00b414d63100b16944e3ab36b1ffceecd57
* Merge "libgui: Allow an IGBProducer to disable allocation"Dan Stoza2015-04-241-0/+36
|\
| * libgui: Allow an IGBProducer to disable allocationDan Stoza2015-04-231-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix some bitrot/warnings in testsDan Stoza2015-04-209-77/+108
|/ | | | | | | | These tests hadn't been run in a while and had accumulated some rot. This fixes most of the compile warnings and some tests which fail incorrectly, but 2 failures remain on N6. Change-Id: I7fee78cd058a32f4d7df40ec9f899ff767f68517
* DO NOT MERGE libgui: Prepare for IGBC::BufferItem removalDan Stoza2015-03-192-7/+9
| | | | | | | | | | | | | | | | | Currently, there are two instances of BufferItem: one inside of IGraphicBufferConsumer, and a standalone one inside of libgui. They only differ in the name of one of the fields, and we want to remove the IGBC version. This changes things so that client code may be incrementally switched over to the libgui version. This is a squashed commit containing the following changes: I64f495105f56cbf5803cea4aa6b072ea29b70cf5 I1394e693314429ada93427889f10b7b01c948053 I9c3bc8037fa9438d4d9080b8afb694219ef2f71f I699ed0a6837076867ca756b28d1ffb2238f7a0d9 Iac8425e1241774304a131da2fb9dec6e82922f13 Change-Id: Ic4d51f5df6dbc70b376d13fceba2335b9bae4f3d
* DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.Eino-Ville Talvala2015-03-196-22/+66
| | | | | | | | | | | | | | | - 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
* am 55f71bc0: Merge "Replace IInterface::asBinder() with a static"Marco Nelissen2014-11-171-2/+2
|\ | | | | | | | | * commit '55f71bc0800b9ec7a779c5d30d5a90e074c2526b': Replace IInterface::asBinder() with a static
| * Replace IInterface::asBinder() with a staticMarco Nelissen2014-11-171-2/+2
| | | | | | | | | | | | | | so we can do NULL checks again, and update calls to IInterface::asBinder() to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
* | am 98d20f82: Merge "Add a BufferItem parameter to onFrameAvailable" into ↵Dan Stoza2014-11-076-6/+6
|\ \ | |/ |/| | | | | | | | | lmp-mr1-dev * commit '98d20f82ca8979b30c81df9639f54ab11e1951f9': Add a BufferItem parameter to onFrameAvailable
| * Add a BufferItem parameter to onFrameAvailableDan Stoza2014-11-076-6/+6
| | | | | | | | | | | | | | | | | | | | Passes the BufferItem for the queued buffer to the onFrameAvailable callback so the consumer can track the BufferQueue's contents. Also adds an onFrameReplaced callback, which is necessary if the consumer wants to do anything more than simple queue length tracking. Bug: 18111837 Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
* | Add missing include to fix libc++ build.Dan Albert2014-11-071-0/+2
| | | | | | | | | | | | | | | | This was previously committed, but I guess it got lost in the merge queue. Bug: 15193147 Change-Id: Ic0e5d90ab403fb833d6a3bb7c55d279c56534869
* | am e1e3d278: Merge "Clean cruft out of makefiles."Dan Albert2014-09-121-7/+1
|\ \ | |/ |/| | | | | * commit 'e1e3d278549eb6389eb0b5fa3f13a4ac079a55a2': Clean cruft out of makefiles.
| * Clean cruft out of makefiles.Dan Albert2014-09-111-7/+1
| | | | | | | | | | | | | | Cleans up manual uses of stlport and bionic (and removes uses of private bionic headers). Change-Id: I157309d702e59152adfa3450939082248ae4c043
* | GLConsumer: Fix eglTerminate/eglInit edge case.Eric Penner2014-08-271-0/+55
| | | | | | | | | | | | | | | | | | If a display is terminated and then initialized, we can't detect this using the display itself (it has the same value), but all EglImages still become invalid for the display. This patch detects this during image binding and forces creation of a new EglImage. Bug: 10430249 Change-Id: I75101c50962f21263dca3ec6e241a2e5a3c23dad
* | GLConsumer: Stop using default constructor paramsDan Stoza2014-06-243-4/+8
| | | | | | | | | | | | | | | | Removes the dependency on default constructor parameters for GLConsumer so that a different constructor prototype can safely be added. Change-Id: I0da924bbd4c141edbf305598c1be8bc575654680
* | SurfaceFlinger: Add sourceCrop to screenshotDan Stoza2014-05-231-2/+3
| | | | | | | | | | | | | | | | | | Adds a sourceCrop Rect parameter to screenshot commands, which allows clients to capture only a portion of the screen instead of the whole screen. Bug: 15137922 Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
* | BufferQueue: Add StreamSplitterDan Stoza2014-04-153-1/+248
| | | | | | | | | | | | | | | | | | 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 "BufferQueue: Add producer buffer-released callback"Dan Stoza2014-04-112-13/+17
|\ \
| * | BufferQueue: Add producer buffer-released callbackDan Stoza2014-03-312-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "BufferQueue: Remove Bn version of create*"Dan Stoza2014-04-081-4/+4
|\ \ \
| * | | BufferQueue: Remove Bn version of create*Dan Stoza2014-04-071-4/+4
| |/ / | | | | | | | | | | | | | | | | | | It turns out that there's no reason to have both I* and Bn* versions of the createBufferQueue method, so I removed the Bn* version. Change-Id: I66aeb09e10458ae540ddf1f38d2d0154ea8f315b
* | | Remove deprecated BufferQueue constructorDan Stoza2014-04-078-34/+44
|/ / | | | | | | | | Bug: 13415624 Change-Id: I153b5470b21832cebe3c617d28a4ab9c9bf3b362
* | BufferQueue: Test remote producer and consumerDan Stoza2014-03-211-13/+83
| | | | | | | | | | | | | | | | | | 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
* | Fix broken build for more testsJesse Hall2014-03-133-0/+4
| | | | | | | | Change-Id: I7bdd12a833233724805d01d993541ee05caa9bf6
* | BufferQueue: Allow detaching/reattaching buffersDan Stoza2014-03-101-33/+190
| | | | | | | | | | | | | | | | | | | | 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
* | FramebufferNativeWindow.h is obsoleteAndy McFadden2014-03-053-4/+0
| | | | | | | | | | | | This adds a deprecation #warning to the header. Change-Id: Ia32f16e491cb01d435ec8846dda3d9a7d1a9cfc5
* | am 1738d4fc: am 462fb3a8: Merge "gui: Fix return code assert in ↵Igor Murashkin2014-03-041-1/+1
|\ \ | |/ | | | | | | | | | | CpuConsumer_test." * commit '1738d4fca78b7678d09d5c8898e1f80fa63b4a6d': gui: Fix return code assert in CpuConsumer_test.
| * gui: Fix return code assert in CpuConsumer_test.Alistair Strachan2013-12-041-1/+1
| | | | | | | | | | | | | | | | | | The CpuConsumer error code was changed recently from INVALID_OPERATION to NOT_ENOUGH_DATA, however the CpuConsumer_test was not updated. This change fixes the return code checked by CpuConsumer_test so the test no longer fails. Change-Id: Ie548ddcb313fa34c130ac63355090cb44ac15ebf
* | Fix calls to captureScreenDan Stoza2014-02-191-2/+2
| | | | | | | | Change-Id: Ic0ff47afa29f143131906082dff79d4e907b7143
* | libgui: Fix segfault in SRGB testsDan Stoza2014-01-291-0/+2
| | | | | | | | | | | | | | Make the test exit cleanly if the output buffer is never mapped. Bug: 12761226 Change-Id: If789f02198851a17b11ee06f612f9ba7e06da754
* | libgui: Add a test for SRGB surfacesDan Stoza2014-01-071-93/+222
| | | | | | | | | | | | | | | | | | Add SRGBTest.RenderToSRGBSurface, which validates that passing the SRGB colorspace attributes to eglCreateWindowSurface actually results in an SRGB surface by comparing the output values to those of a standard RGB surface. Change-Id: I3d5fef8070ed8fa2357ddd1c5fcc849ae3fbd12a
* | libgui: Add a test suite for SRGB testingDan Stoza2013-12-122-0/+346
| | | | | | | | | | | | | | This is the start of an SRGB test suite. Currently it has a test for SRGB texture reads in GLES3. Change-Id: I553ee2691dc92b98cae7a003084d4e2823d40d95
* | libgui: Split SurfaceTexture tests into more filesDan Stoza2013-12-0921-2484/+2959
| | | | | | | | | | | | | | | | Extract the many different test fixtures and suites in SurfaceTexture_test.cpp into separate files. No real functional changes, just tweaking headers to keep things building (and adding a few copyright headers I forgot last time). Change-Id: Id801bd5d617f0cc61d22508fb9b71b41694bdecf
* | libgui: Fix a couple of minor bugs, extract GLTestDan Stoza2013-11-264-346/+384
| | | | | | | | | | | | | | Fix a couple of minor bugs in existing tests, and extract the GLTest class into its own files. Change-Id: I7d9570a0d3dbc9c5d7f9b13f2017607af42744b3
* | gui: Add tests for IGraphicBufferProducerIgor Murashkin2013-11-213-7/+590
| | | | | | | | | | | | | | * Basic tests only. Needs more complicated queue/dequeue tests. * Also needs consumer-side tests to really be thorough. Change-Id: I1099dd56d65b6e9dfa15377726d6054ce657c0ca
* | am e803e609: am 799f5126: Fix build (tests)Mathias Agopian2013-09-171-1/+1
|\ \ | |/ | | | | | | * commit 'e803e6095e007563df939326fdd3ca5109619a42': Fix build (tests)
| * am 799f5126: Fix build (tests)Mathias Agopian2013-09-171-1/+1
| |\ | | | | | | | | | | | | * commit '799f51268006f319f6ae538dca670bfc7f522688': Fix build (tests)
| | * Fix build (tests)Mathias Agopian2013-09-171-1/+1
| | | | | | | | | | | | Change-Id: I5b233ef448e5e7eec3818c6586dfea138b28f7b6
| * | resolved conflicts for merge of 1852eb4f to klp-dev-plus-aospKenny Root2013-09-121-1/+0
| |\ \ | | |/ | |/| | | | Change-Id: I7217c0e859b384a042c02fe339e745996c6ef49e
| | * Remove copy of UniquePtr.hKenny Root2013-09-111-1/+0
| | | | | | | | | | | | | | | | | | | | | The UniquePtr.h file is no longer in libcore/... so there is no need to have this extra copy of it anymore. Change-Id: I4ec4f86d2844e524b50441c3a9100a50a6a45b1a
* | | Use canonical UniquePtr.h fileKenny Root2013-09-111-1/+1
|/ / | | | | | | Change-Id: Icc75bca078ffaf0c09b88ce5e897d666d1054063
* | Fix buildAndy McFadden2013-08-191-1/+1
| | | | | | | | | | | | Neglected the "checkbuild"-built tests. Change-Id: I202692f1a6d1e306c88e820c959d07d16e7c6a00
* | Fix build. optional tests were broken.Mathias Agopian2013-08-141-0/+3
| | | | | | | | Change-Id: Iba9f5cb57f134559e1f9c55e293578d9f5d8cb96
* | fix tests moreMathias Agopian2013-08-061-1/+1
| | | | | | | | Change-Id: I05c3dd6a22440844f8bd071f4c2b620b2bd8c720
* | fix testsMathias Agopian2013-08-061-1/+1
| | | | | | | | Change-Id: I0f4d613481eda2c44a2d631a81d75de7e52e7a62