summaryrefslogtreecommitdiffstats
path: root/libs/gui
Commit message (Collapse)AuthorAgeFilesLines
...
* SurfaceTexture: fix an out of bounds array writeJamie Gennis2012-09-211-1/+1
| | | | | | | | | | | | | | | | This change fixes an issue causing the mEglContext member of a SurfaceTexture to get incorrectly zeroed out. This would happen when a call to ConsumerBase::releaseBufferLocked resulted in the current buffer being freed. Freeing the current buffer would set SurfaceTexture::mCurrentTexture to -1, which would then be used by SurfaceTexture::releaseBufferLocked to reset the current slot's EGLSyncKHR to EGL_NO_SYNC_KHR (= 0). This would overwrite the mEglContext field, resulting in context mismatch errors in SurfaceTexture::doGLFenceWaitLocked. The fix is to simply use the buffer slot that's passed in to SurfaceTexture::releaseBufferLocked rather than mCurrentTexture. Change-Id: I0e5e2bd88fcbb354c35a3744f317716fff3e0e41
* gui: conditionally set USE_NATIVE_FENCE_SYNC for msm8960Jeff Boody2012-09-182-0/+54
| | | | | Change-Id: Ib7ad11597ef7c79162a0b0a49a1b8ae16d192c10 Signed-off-by: Iliyan Malchev <malchev@google.com>
* SurfaceTexture: default to doing GL syncJamie Gennis2012-09-181-2/+15
| | | | | | | | | This change makes updateTexImage default to performing the necessary synchronization and adds an argument for SurfaceFlinger to disable that synchronization so that it can be performed lazily. Change-Id: I7c20923cc786634126fbf7021c9d2541aa77be5d Bug: 6991805
* Plumb display name into SurfaceFlingerAndy McFadden2012-09-182-7/+9
| | | | | | | | | | The Surface createDisplay() call takes a display name for debugging. This change carries it through SurfaceFlinger and displays it in the "dumpsys SurfaceFlinger" output. Bug 7058158 Change-Id: I79f3474a8656ff1beb7b478e0dbf2c5de666118a
* New testAndy McFadden2012-09-161-0/+53
| | | | | | | Added a test to confirm that the transform hint is being respected. Bug: 7162482 Change-Id: I892fe962f8cf2759ff951b4f5065b9ac2732c3d1
* Fix transform hintsAndy McFadden2012-09-161-2/+4
| | | | | | | | | The hints were being set a little too late, so the pre-rotation stuff wasn't quite working. Bug 7054997 Change-Id: Id8d5c626db7a76f768ba762a145b315878ee08e6
* Merge "Watch for SurfaceFlinger death" into jb-mr1-devAndy McFadden2012-09-121-2/+37
|\
| * Watch for SurfaceFlinger deathAndy McFadden2012-09-061-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ComposerService object wasn't watching for SurfaceFlinger restarts, which doesn't usually matter because the app framework restarts when SurfaceFlinger dies. However, mediaserver continues to run, which means its ComposerService object was trying to use a dead handle, and playback of DRM movies was failing. This adds a DeathRecipient listener and some logic to re-establish the SurfaceFlinger connection. Bug 6645813 Change-Id: I07581b881d3835601aa57d5358c8259d93bc4515
* | SurfaceTexture: eglDestroySync after duping its fdJamie Gennis2012-09-101-0/+1
| | | | | | | | | | | | | | This change adds a call to eglDestroySync after we've dup'd the fd for the Android fence that the EGLSyncKHR object wraps. Change-Id: I4fa6ece863260793630d70bb9a69d6284d05d99e
* | SurfaceTexture: use eglWaitSyncJamie Gennis2012-09-101-2/+72
| | | | | | | | | | | | | | | | | | | | | | This change adds a compile-option to use eglWaitSyncANDROID to ensure that texturing operations that access the current buffer of a SurfaceTexture do not occur until the buffer is completely written. It also moves this synchronization into a new SurfaceTexture method called doGLFenceWait and changes SurfaceFlinger's Layer class to use that method rather than performing its own wait on the fence. Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
* | SurfaceTexture: use EGL-created native fencesJamie Gennis2012-09-091-26/+64
| | | | | | | | | | | | | | This change adds support for using Android fences that come from EGLSyncKHR objects as the release fence for a buffer. Change-Id: Ice192ce2ec001020f909a2018afdf0f17b24dec9
* | libgui: move fence handling into ConsumerBaseJamie Gennis2012-09-064-24/+40
|/ | | | | | | | This change moves some common fence handling code into the base class for BufferQueue consumer classes. It also makes the ConsumerBase class initialize a buffer slot's fence with the acquire fence every time a buffer is acquired. Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
* display projection API now has a single function instead of 3Mathias Agopian2012-09-041-43/+17
| | | | Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
* BufferQueue: add a setMaxAcquiredBufferCount checkJamie Gennis2012-09-042-0/+26
| | | | | | | 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-303-29/+35
| | | | | | This change adds a few error checks both in the framework and in some tests. Change-Id: I2baf2676942a0dc15866e75852a775a0091ed16d
* BufferQueue: add a check for the max acquired bufsJamie Gennis2012-08-301-0/+17
| | | | | | | This change adds an error check to ensure that consumers don't acquire more buffers than the maximum that they set. Change-Id: I026643564bde52732e4ee6146972b207ddbbba77
* BufferQueue: use max acquired buffer countJamie Gennis2012-08-303-16/+33
| | | | | | | | | This change makes BufferQueue derive the min undequeued buffer count from a max acquired buffer count that is set by the consumer. This value may be set at any time that a producer is not connected to the BufferQueue rather than at BufferQueue construction time. Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
* Merge "BufferQueue: simplify max buffer count handling" into jb-mr1-devJamie Gennis2012-08-301-82/+68
|\
| * BufferQueue: simplify max buffer count handlingJamie Gennis2012-08-291-82/+68
| | | | | | | | | | | | This change reworks how the maximum buffer count is computed. Change-Id: I7d3745814b9bd6f6f447f86bfea8eb7729914ebf
* | Merge "BufferQueue: clean up buffer counting" into jb-mr1-devJamie Gennis2012-08-303-59/+60
|\ \ | |/
| * BufferQueue: clean up buffer countingJamie Gennis2012-08-293-59/+60
| | | | | | | | | | | | | | | | 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
* | Revert "A vendor ril depends on a native screen shot code."Wink Saville2012-08-301-8/+0
|/ | | | | | This reverts commit 9b5782baf0a8a2d7afc7129453beb5df7abe7650. A new ril for toro, hack no longer needed.
* A vendor ril depends on a native screen shot code.Wink Saville2012-08-281-0/+8
| | | | | | | Add a temporary shim until the vendor fixes the ril. Bug: 7073467 Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
* Compatibility work around for bad graphics driver dependency.Jeff Brown2012-08-271-0/+9
| | | | | | | | | | | This is a compatibility shim for one product whose drivers are depending on SurfaceComposerClient::getDisplayInfo( int, DisplayInfo*) when it really shouldn't. Revert this patch when the problem has been resolved. Bug: 7065398 Change-Id: I6542691b81fd1b1e1d79500a62e82d40a3d51db7
* Remove unused "layer" argument from show().Jeff Brown2012-08-272-3/+3
| | | | Change-Id: I8944a9f4a27c330b11e5e837c69b88c8f84145ba
* Banish DisplayID from the SurfaceFlinger API.Jeff Brown2012-08-276-52/+46
| | | | | | | | | | | | | | | 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
* Merge "SurfaceTexture: inherit from ConsumerBase (try 2)" into jb-mr1-devJamie Gennis2012-08-242-194/+96
|\
| * SurfaceTexture: inherit from ConsumerBase (try 2)Jamie Gennis2012-08-212-194/+96
| | | | | | | | | | | | | | | | | | This change makes SurfaceTexture inherit from ConsumerBase. It removes all of the functionality from SurfaceTexture that is now provided by the base class. This includes fixes for two bugs that were found after checking this change in the first time and then reverting it. Change-Id: Ie2d9f4f27cfef26fdac341de3152e842b01a58d2
* | Merge "Add BufferItemConsumer, a simple BufferQueue consumer." into jb-mr1-devEino-Ville Talvala2012-08-213-1/+98
|\ \ | |/ |/|
| * Add BufferItemConsumer, a simple BufferQueue consumer.Eino-Ville Talvala2012-08-213-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "CpuConsumer: inherit from ConsumerBase" into jb-mr1-devEino-Ville Talvala2012-08-201-113/+26
|\ \ | |/
| * CpuConsumer: inherit from ConsumerBaseEino-Ville Talvala2012-08-201-113/+26
| | | | | | | | Change-Id: I55178b1d673ffa0fbc6e63ef47642c64d4d03228
* | Merge "Revert "SurfaceTexture: inherit from ConsumerBase"" into jb-mr1-devJamie Gennis2012-08-202-93/+194
|\ \
| * | Revert "SurfaceTexture: inherit from ConsumerBase"Jamie Gennis2012-08-202-93/+194
| | | | | | | | | | | | | | | | | | This reverts commit ed059a8d754770c3cf28b78dba30f7a6ba475dbe Change-Id: I72542c2595771a40c2c88251e0d6eb54e305b99b
* | | Merge "Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"" into ↵Jamie Gennis2012-08-201-1/+0
|\ \ \ | | | | | | | | | | | | jb-mr1-dev
| * | | Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"Jamie Gennis2012-08-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f8d33c652b930abbfb0722f3a2928cbc2ea71078 Change-Id: I1ff2e1cc85824a8fac1051f573d2931db81af511
* | | | Merge "SurfaceTexture: call ConsumerBase::freeBufferLocked" into jb-mr1-devJamie Gennis2012-08-201-0/+1
|\ \ \ \ | |/ / /
| * | | SurfaceTexture: call ConsumerBase::freeBufferLockedJamie Gennis2012-08-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes SurfaceTexture::freeBufferLocked so that it calls the base class implementation. Change-Id: I45d76fb2eb02c1fa6e4e917823ead83e2086bd15
* | | | resolved conflicts for merge of 21938749 to jb-mr1-devJean-Baptiste Queru2012-08-201-6/+10
|\ \ \ \ | |/ / / |/| | | | | | | Change-Id: I17da10797736f3772a143e2015fe25df0bb3eb3f
| * | | Fix error trap in SurfaceTexture ClientSteve Critchlow2012-07-101-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an issue in Surface::lock where failure to lock a surface resulted in two bad things happening: - success was returned to the caller (it was apparently locked). - an uninitialised pointer was returned as the buffer. Change-Id: I8b0df81400e0fa0542a8bb993d76923ac96b686e
* | | | Merge "SurfaceTexture: inherit from ConsumerBase" into jb-mr1-devJamie Gennis2012-08-172-194/+93
|\ \ \ \ | | |/ / | |/| |
| * | | SurfaceTexture: inherit from ConsumerBaseJamie Gennis2012-08-162-194/+93
| | |/ | |/| | | | | | | | | | | | | | | | This change makes SurfaceTexture inherit from ConsumerBase. It removes all of the functionality from SurfaceTexture that is now provided by the base class. Change-Id: I4a881df42810a14ee32d4ef7c8772a8f2510f4c7
* | | display states can't share the dirty flagsMathias Agopian2012-08-161-3/+3
|/ / | | | | | | Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
* | improve [un]marshalling of non-binder objectsMathias Agopian2012-08-133-33/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this change introduces a new class LightFlattenable<> which is a protocol to flatten simple objects that don't require binders or file descriptors; the benefit of this protocol is that it doesn't require the objects to have a virtual table and give us a consitant way of doing this. we also introduce an implementation of this protocol for POD structures, LightFlattenablePod<>. Parcel has been update to handle this protocol automatically. Sensor, Rect, Point and Region now use this new protocol. Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
* | make multi-display more realMathias Agopian2012-08-103-37/+160
| | | | | | | | | | | | | | - displays are represented by a binder on the client side - c++ clients can now create and modify displays Change-Id: I203ea5b4beae0819d742ec5171c27568f4e8354b
* | libgui includes refactoringMathias Agopian2012-08-101-14/+14
| | | | | | | | Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
* | SurfaceTexture: Fix a fence fd leak.Jamie Gennis2012-08-081-1/+1
| | | | | | | | | | Bug: 6949010 Change-Id: I289992c964504b4fe5458dbd19b248a841ef043f