summaryrefslogtreecommitdiffstats
path: root/libs/gui/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix build. 3rd attemptMathias Agopian2013-08-061-1/+1
| | | | | | | | Change-Id: I4317b34fd07890ea7cf9db51be42d72ef21aca89
* | All consumers now take an IGraphicBufferConsumer instead of a BufferQueueMathias Agopian2013-08-064-8/+10
| | | | | | | | | | | | | | | | | | | | 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-051-0/+18
|\ \
| * | BufferQueue: Support query of consumer usage bitsEino-Ville Talvala2013-07-301-0/+18
| | | | | | | | | | | | | | | Bug: 9592202 Change-Id: I61a17758200e61adaca695b426db3df0f6637d4c
* | | Binderize the consumer side of BufferQueueMathias Agopian2013-08-012-2/+2
|/ / | | | | | | | | | | | | | | | | | | 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
* | fix buildMathias Agopian2013-07-261-2/+0
| | | | | | | | Change-Id: I04df8ec96510b16e84054089f7c02609d8fe2b0c
* | Make ANW.setSwapInterval(0) work againMathias Agopian2013-07-192-9/+3
| | | | | | | | | | | | | | | | | | | | | | 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-181-3/+1
| | | | | | | | | | | | | | | | | | | | 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-184-54/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-5/+10
| | | | | | | | Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
* | Pay attention to buffer timestampsAndy McFadden2013-07-101-2/+2
|/ | | | | | | | | | | | | | 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
* libgui_test: fix a couple minor test issuesJamie Gennis2013-04-241-9/+2
| | | | | | | | | | This change fixes how the MultiTextureConsumerTest.EGLImageTargetWorks checks for pixels. It removes the call to eglSwapBuffers so that the test does not rely on EGL swap-preserve behavior, and it makes the test use checkPixel() rather than doing glReadPixels itself. Bug: 8349336 Change-Id: I0f446a0083eebd07af6fd208762878b4e367725a
* Add a test that checks multi-texturing works with GL_TEXTURE_EXTERNAL_OESMathias Agopian2013-04-162-0/+106
| | | | | Bug: 8395618 Change-Id: I160d29699593b11058533ca753e275d5deeb3b54
* libgui_test: increase the tolerance for a YUV testJamie Gennis2013-04-081-12/+12
| | | | | | | | This change increases the pixel difference tolerance of the SurfaceTextureGLTest.TexturingFromCpuFilledYV12BufferNpot test from 2 to 3. Bug: 8349135 Change-Id: I82e361a689335f49065cacd8a3fc145d67b125f1
* libgui: fix an EGLImage leakJamie Gennis2013-04-081-4/+4
| | | | | | | | | | | | This moves the call to ConsumerBase::abandon from the ConsumerBase dtor to ConsumerBase::onLastStrongRef. The abandon call relies on virtual methods to perform the clean-up, so calling it from the ConsumerBase dtor after the derived classes dtors ran was skipping some of the clean-up. The onLastStrongRef method should get called just before the most derived class's dtor gets called. Bug: 8349135 Change-Id: I836946826927cc1ed69c049049f525f92b17a269
* fix build. update test to new APIMathias Agopian2013-03-201-11/+11
| | | | Change-Id: I31ca84c85edff3e2ff90c554769e058110f27d49
* Fix argument types in IGraphicBufferProducer methodsJesse Hall2013-03-181-2/+2
| | | | | Bug: 8384764 Change-Id: I7a3f1e1a0584a70af04f9eafef900505389d2202
* add two libgui testsMathias Agopian2013-03-081-0/+75
| | | | | | | | | | we check that the order in which we destroy GLConsumer wrt. releasing the corresponding EGLSurface via eglMake(Un)Current doesn't leak a buffer. On at least 2 devices this test doesn't pass. Change-Id: I63ab83951b4b0a977f38571158f948cbd9dc7cec
* CpuConsumer_test: Extend test with new formats RGBA8888 and optional Y8/Y16Igor Murashkin2013-03-051-9/+255
| | | | Change-Id: I0a0f6ce73516883bf50c749a1759abbdb3748e08
* Added a test that checks the error behavior of ConsumerBase::abandonMathias Agopian2013-02-251-1/+31
| | | | | | | | We check that calling eglSwapBuffers() on an abandonned BufferQueue return EGL_BAD_SURFACE -- this is to ensure consistancy between drivers. Change-Id: Ibb548e0cf767ceee69f2fc4a85811d15a6522277
* get rid of Surface::getISurfaceTexture()Mathias Agopian2013-02-191-1/+1
| | | | | | this was there just for legacy reasons. Change-Id: I0a48d6e04d7efa65033f9f10c91bba557f16ae8b
* Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-143-11/+10
| | | | Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
* libgui: disallow NULL Fence pointersJamie Gennis2013-02-122-3/+1
| | | | | | | | | This change eliminates the uses of a NULL sp<Fence> indicating that no waiting is required. Instead we use a non-NULL but invalid Fence object for which the wait methods will return immediately. Bug: 7892871 Change-Id: I5360aebe3090422ef6920d56c99fc4eedc642e48
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-183-30/+30
| | | | | | | | | | 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
* stop using a deprecated SurfaceTextureClient ctorJamie Gennis2012-12-122-3/+3
| | | | Change-Id: I8c8282a0debd551db290dd6849faf272a88c704c
* New testAndy McFadden2012-09-161-0/+53
| | | | | | | Added a test to confirm that the transform hint is being respected. Bug: 7162482 Change-Id: I892fe962f8cf2759ff951b4f5065b9ac2732c3d1
* BufferQueue: add a setMaxAcquiredBufferCount checkJamie Gennis2012-09-041-0/+21
| | | | | | | This change adds a check to verify the validity of the value passed to setMaxAcquiredBufferCount. Change-Id: I39730557aa58261e678bd6e4fce11bab78e98362
* libgui: add BufferQueue test infrastructureJamie Gennis2012-08-312-0/+97
| | | | | | | | | This change adds some infrastructure for testing the BufferQueue class. It also includes a test that tests the new check in BufferQueue::acquireBuffer that prevents the consumer from acquiring more than one buffer beyond the max acquired buffer count that was set. Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
* libgui: disable CpuConsumer testsJamie Gennis2012-08-311-3/+9
| | | | | | | This change disables the CpuConsumer tests because they require a Gralloc format that is not supported on all devices. Change-Id: Ifaa618062c1dae53d9fcb9e16ba92c480d3dbd0c
* SurfaceTexture: fix a few testsJamie Gennis2012-08-302-6/+18
| | | | Change-Id: Ic74fe8791361f8fe91ad7149720fafd4cc154ac1
* libgui: add some error checksJamie Gennis2012-08-301-27/+31
| | | | | | This change adds a few error checks both in the framework and in some tests. Change-Id: I2baf2676942a0dc15866e75852a775a0091ed16d
* BufferQueue: clean up buffer countingJamie Gennis2012-08-291-6/+6
| | | | | | | | This change is a clean up of some of the handling of the maximum number of buffers that are allowed at once. It mostly renames a few member variables and methods, but it includes a couple small refactorings. Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
* Banish DisplayID from the SurfaceFlinger API.Jeff Brown2012-08-272-4/+5
| | | | | | | | | | | | | | | Use only display tokens in the API to refer to new displays. Don't require the caller to specify the display when creating a surface (since in general a surface could be shown on any display). This is intended to be a minimum change just to update the API. Note that SurfaceFlinger still uses DisplayID in a few places internally that might cause some features not to work properly when there are multiple displays (LayerScreenshot, for example). Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
* Update ANativeWindow clients for syncJamie Gennis2012-06-205-263/+167
| | | | | | | This change updates the uses of ANativeWindow to use the new ANW functions that accept and return Sync HAL fence file descriptors. Change-Id: I3ca648b6ac33f7360e86754f924aa072f95242f6
* am bd56aabb: am 515f19da: Merge "Recreate EGLImage for previously used ↵Jesse Hall2012-05-211-0/+28
|\ | | | | | | | | | | | | slots" into jb-dev * commit 'bd56aabb92097546073c8dd8949bb03161e72c56': Recreate EGLImage for previously used slots
| * Recreate EGLImage for previously used slotsJesse Hall2012-05-171-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SurfaceTexture would only create an EGLImage for a buffer slot when BufferQueue returns a GraphicBuffer, i.e. either the slot was acquired for the first time ever, or the buffer for the slot was reallocated. But the EGLImage may also need to be re-created for a previously-acquired buffer if the slot's EGLImage was destroyed during detachFromContext(); in this case BufferQueue won't return a GraphicBuffer since SurfaceTexture already has a reference to the correct buffer. Bug: 6461693 Change-Id: Ib95d0d757192efe336c5fda0866f857481a6617d
* | am dd739965: Merge changes I32fbc2b6,Ifd0ed05b into jb-devJamie Gennis2012-05-151-44/+0
|\ \ | |/ | | | | | | | | * commit 'dd73996552938ac5165a35f09d389abedcf421ef': SurfaceFlinger: recompute visible regions less libgui: remove setPostTransformCrop
| * libgui: remove setPostTransformCropJamie Gennis2012-05-141-44/+0
| | | | | | | | | | | | | | | | This change removes the setPostTransformCrop function from SurfaceTextureClient. It also includes a small logging fix in BufferQueue. Bug: 6299171 Change-Id: Ifd0ed05b95dad6085e7a8267fda4d69b76ea3bad
* | Add a BufferQueue CPU consumer.Eino-Ville Talvala2012-05-142-0/+608
|/ | | | | | | | | | | 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
* libgui: Add support for post-xform crops.Jamie Gennis2012-05-082-22/+63
| | | | | | | | This change adds support for specifying a crop rectangle to a SurfaceTextureClient that is in post-transformed coordinate space. Change-Id: I247901de343e71b32850f7ae3bac62dfa612ad3d Bug: 6299171
* libgui: Add plumbing for active rectangleJamie Gennis2012-04-241-91/+67
| | | | | | | | This change adds the plumbing to SurfaceTextureClient, BufferQueue, and SurfaceTexture to get the active rectangle passed to the ANativeWindow to the buffer consumer. Change-Id: I35da0889b266327ebb079b6a7136fa3e2e8b00e6
* SurfaceTexture: shrink all sides when croppingJamie Gennis2012-04-161-3/+3
| | | | | | | | | This change makes SurfaceTexture include an offset for all sides of the crop region when cropping. This keeps the image centered, to minimize the visual changes when switching between the texture transform matrix-based cropping and something that does proper cropping (e.g. HWComposer). Change-Id: I541d3046fd92e49221b488444df36d490924d1c5
* Enabled cropping support in SurfaceTextureDaniel Lam2012-04-121-0/+120
| | | | | | | | | SurfaceTexture will modify the crop rect so it matches the desired output aspect ratio when the scaling mode is NATIVE_WINDOW_SCALING_MODE_CROP. Added a test for this new scaling mode. Change-Id: I60f24dcbc294b65cd10a393d9e27d40f07d27bb6
* SurfaceTexture: work around a compiler bugJamie Gennis2012-04-111-1/+1
| | | | | | | This change works around a compiler bug with the GCC 4.6 toolchain. Bug: 6292211 Change-Id: I004c4750d92a29f193a37d8e605a28fdc3b7f076
* SurfaceTexture: add a test for user sizes & prerotationJamie Gennis2012-04-111-0/+167
| | | | | | | | | This change adds 3 tests for: - User-overridden buffer size - Transform hint - User-overridden buffer size with transform hint Change-Id: Ib15ea354685e436822c506099613b2bffa7b68c9
* Fixed disconnect bug in SurfaceTextureDaniel Lam2012-04-021-1/+146
| | | | | | | | | BufferQueue's disconnect could race with updateTexImage where invalid buffers could be released. Additionally fixed similar bug with setBufferCount. Tests were added to stress the disconnect mechanism. Change-Id: I9afa4c64f3e025984e8a9e8d924852a71d044716
* Merge "SurfaceTexture: add context attach & detach"Jamie Gennis2012-04-011-178/+595
|\
| * SurfaceTexture: add context attach & detachJamie Gennis2012-03-301-178/+595
| | | | | | | | | | | | | | | | | | This change adds the detachFromContext and attachToContext methods to SurfaceTexture. These methods allow the SurfaceTexture to switch from one consumer GLES context to another. This change also includes a few cleanups to the error return codes in updateTexImage. Change-Id: I0df1eb599aa7b6f58f07431f242f8f09269559ed
* | remove libandroid.so from targets that don't need itColin Cross2012-03-271-1/+0
|/ | | | | | | pdk builds don't have libandroid.so available. Remove it from projects that aren't actually using it. Change-Id: I100dc84aaf8160c1062a122ef6d5aec0534d73fa