summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* [DO NOT MERGE] GraphicBufferAllocator: stall alloc for async freesandroid-cts-4.2_r2Jamie Gennis2012-12-101-52/+108
| | | | | | | | | This change makes GraphicBufferAllocator::alloc wait for pending async frees to complete before attempting to allocate a gralloc buffer if there are more than 8 pending async frees. Bug: 7696861 Change-Id: I1fae86e13edefcaa153b8ce9fd057f335716059e
* Revert "ConsumerBase: free buffers outside the lock"Jamie Gennis2012-12-071-24/+10
| | | | This reverts commit b21a4e3b5f7f07ed160ca6e1809313e2a8e2a6a4.
* DO NOT MERGE GraphicBufferAllocator: make frees asyncJamie Gennis2012-12-071-11/+55
| | | | | | | | | This change makes GraphicBufferAllocator::free queue a job to another thread to perform the actual free operation. This prevents potentially slow free operations from blocking rendering. Bug: 7675940 Change-Id: Id61099d66bb4c3949d04184e0d7f192ac18076b4
* ConsumerBase: free buffers outside the lockJamie Gennis2012-12-061-10/+24
| | | | | | | | | This change makes ConsumerBase::onBuffersReleased hold a reference to all its gralloc buffers until after the mutex is unlocked. This prevents slow gralloc::free calls from causing lock contention with rendering threads. Bug: 7675940 Change-Id: I0ec805d1b612afeeecfffec03f982371d27d93be
* fix typo that broke all the buildsMathias Agopian2012-11-191-6/+3
| | | | | Bug: 7584338 Change-Id: Ieb8c27a544ac583af9aa1e0376e33a673d2d9673
* fix an out-of-bounds memory accessMathias Agopian2012-11-151-4/+6
| | | | | | | | in this particular case, this OOB is always harmless (and that's why it didn't get fixed from MR1), however, it interfers with valgrind debugging. Change-Id: Ic977e03287e59c4b124a89146c9023bd0cb540a8
* Reduce emulator logspamAndy McFadden2012-11-081-2/+2
| | | | | | | | | The emulator doesn't support systrace, but we should point that out at most once per process. Bug 7436352 Change-Id: I06b2c1ea0df6c02c11cd2496423c337f8d7c62a1
* Revert "Revert "put back the unused virtuals in Vector<>""Dave Burke2012-10-251-0/+19
| | | | | | This reverts commit 225c66a48cdc3acef21ee380dc134449749d3cb3 Change-Id: If31a04b81052cbc7dd7bf237c07107c33066d03d
* SurfaceFlinger: add support for secure displaysJamie Gennis2012-10-222-21/+11
| | | | | | | | | This change adds support for displays that are not allowed to display surfaces with the eSecure flag set. All non-virtual displays are considered secure, while virtual displays have their secure-ness specified at creation time. Bug: 7368436 Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
* Merge "BufferQueue: alloc without holding the lock" into jb-mr1-devJamie Gennis2012-10-171-11/+25
|\
| * BufferQueue: alloc without holding the lockJamie Gennis2012-10-111-11/+25
| | | | | | | | | | | | | | | | | | | | This change makes BufferQueue::dequeueBuffer release its mutex before allocating new buffers. This should alleviate lock contention in SurfaceFlinger where SF's main thread can get blocked waiting for an allocation operation to complete. Bug: 7335075 Change-Id: I1b000539cc616a695afab2e9c68507db69e57b13
* | SurfaceFlinger: add animation transactionsJamie Gennis2012-10-151-1/+22
| | | | | | | | | | | | | | | | | | | | This change adds a transaction flag for WindowManager to indicate that a transaction is being used to animate windows around the screen. SurfaceFlinger will not allow more than one of these transactions to be outstanding at a time to prevent the animation "frames" from being dropped. Bug: 7353840 Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
* | Add TEMP_FAILURE_RETRY around open and write callsKenny Root2012-10-121-5/+8
|/ | | | | Bug: 7330849 Change-Id: I9aef3c3d3a248c3eea7ca060124ad6decaa6b4da
* Merge "Fence didn't manager sync_wait error codes properly" into jb-mr1-devMathias Agopian2012-10-091-5/+6
|\
| * Fence didn't manager sync_wait error codes properlyMathias Agopian2012-10-091-5/+6
| | | | | | | | | | | | | | | | | | | | error codes are returned in errno, this caused ::waitForwever() to only wait for 1 second and return improper error code (-1). needed to help debugging 7316632 Bug: 7316632 Change-Id: Ie144f614a88393393972a3a770c6b4b0581f961a
* | Add blankDisplay/unblankDisplay to SurfaceComposerClient.Jeff Brown2012-10-081-0/+8
|/ | | | | Bug: 7309812 Change-Id: Ia401d642094a46c62f0d26c65da1d11341e203a1
* Merge "Revert "ugly, temporary, workaroung for a problem where a binder ↵Dave Burke2012-10-071-12/+0
|\ | | | | | | thread spins forever"" into jb-mr1-dev
| * Revert "ugly, temporary, workaroung for a problem where a binder thread ↵Dave Burke2012-10-061-12/+0
| | | | | | | | | | | | | | | | spins forever" This reverts commit 0845d0245e09548110cacb0f20e9934753388aab Change-Id: I395037cb9427cd11f7de6bb78fbdfa917fc6263a
* | Merge "ugly, temporary, workaroung for a problem where a binder thread spins ↵Dave Burke2012-10-051-0/+12
|\ \ | |/ | | | | forever" into jb-mr1-dev
| * ugly, temporary, workaroung for a problem where a binder thread spins foreverMathias Agopian2012-10-051-0/+12
| | | | | | | | | | Bug: 7289992 Change-Id: I0c3d482a1af57e5f444be2ba7f2751ac3e954af2
* | Fix race condition in ConsumerBase::addReleaseFence()Jesse Hall2012-10-053-3/+8
|/ | | | | | | | | | | This needs the ConsumerBase mutex locked, but wasn't locking it. Two of the four places that called it already held the lock so were fine. Now addReleaseFence() takes the lock itself, and I added addReleaseFenceLocked() for the two already-locked callers, since in one of them dropping the lock would be inconvenient. Bug: 7289269 Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a
* Fix missing parens in CleanSpec.mk.Stephen Hines2012-10-041-0/+1
| | | | Change-Id: I0440a942d3e685d619ec9cc402d3293cb3f52df1
* Fix broken CleanSpec.mk in libs/guiRaph Levien2012-10-041-1/+1
| | | | | | | | | | | The CleanSpec is missing parens, which causes $P to be interpreted as a single variable, and the following printed to the log: Clean step: rm -rf RODUCT_OUT/obj/SHARED_LIBRARIES/libgui_intermediates This patch adds parens as needed. Change-Id: I587998fa67a4884418c286360a577cdbb6ea9a21
* libgui: enable fence support for exynos5Jamie Gennis2012-10-032-1/+3
| | | | | Change-Id: Iffc48412b8c951116a956a3ac7dab8d75eed13da Bug: 7238122
* libgui: fix up compile optionsJamie Gennis2012-10-034-51/+12
| | | | | | | | | This change adds debug info to SurfaceFlinger's dumpsys to indicate that the USE_WAIT_SYNC compile option was enabled, and it removes the ALLOW_DEQUEUE_CURRENT_BUFFER option. Bug: 7238122 Change-Id: I70e08e34c2ef58aa6d2f88229e781a119f84b5a9
* Add Fence::waitForever which logs a warning timeout, and use itJesse Hall2012-10-025-8/+26
| | | | | Bug: 7217641 Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
* Pass display arg to blank/unblankAndy McFadden2012-09-281-4/+8
| | | | | | | | This allows us to blank and unblank displays other than the built-in display (e.g. HDMI). Bug: 7240511 Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
* Revert "Compatibility work around for bad graphics driver dependency."Iliyan Malchev2012-09-271-9/+0
| | | | | | This reverts commit a50b51c03aca449920fc8581a738032a7bce7150 Change-Id: Ibdcd776a7f241dbb2475403ea04f939249774c41
* Show build config in dumpsys SurfaceFlingerAndy McFadden2012-09-254-2/+78
| | | | | | | | | | | | | This adds a line to the "dumpsys SurfaceFlinger" output that shows build-time configuration values. Example: Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \ [libgui USE_FENCE_SYNC] Bug 7206633 Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0
* fix a crasher in SurfaceTexture's setFilteringEnabledMathias Agopian2012-09-241-5/+19
| | | | | bug: 7211067 Change-Id: Id8658a8df429d76c20ab9112858b38e52343dc9c
* ConsumerBase: make fence names meaningfulJamie Gennis2012-09-241-1/+1
| | | | Change-Id: I3580120cb63c027c327e80ec70e68650b75395de
* 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
* Disable the use of clock_gettime for now.Ben Cheng2012-09-191-1/+9
| | | | | Bug: 7100774 Change-Id: I6ede2a37a5d485134fe419b5dc766f70ae4af9d4
* 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
* Merge "Print warnings when backwards timestamps are detected." into jb-mr1-devBen Cheng2012-09-161-5/+55
|\
| * Print warnings when backwards timestamps are detected.Ben Cheng2012-09-161-5/+55
| | | | | | | | | | | | Bug: 7100774 Change-Id: I752fd1680b32ce33d17d6042d6c82e27d7ba9dd2
* | 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
* Region::validate() cannot be called from addRectUnchecked()Mathias Agopian2012-09-121-4/+0
| | | | | | | addRectUnchecked() is allowed to be in an invalid state temporarily. Change-Id: I6f5162b5c49f378978c070a77abba35023fe918c
* strengthen region validationMathias Agopian2012-09-121-23/+59
| | | | Change-Id: I75ee7bc4dd7a2f5357ac8994a23bc8b8bfb6eb44
* 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
* Merge "BufferQueue: add a setMaxAcquiredBufferCount check" into jb-mr1-devJamie Gennis2012-09-042-0/+26
|\