summaryrefslogtreecommitdiffstats
path: root/libs/ui/Fence.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libui: fix passing Fence object over binderColin Cross2014-04-141-2/+2
| | | | | | | | | The Fence object was writing a size_t into the binder buffer in flatten, which changes size if the producer and consumer are running in a 32-bit and a 64-bit process. Use a uint32_t instead. Change-Id: Ifed526513800ce27f9d605101cddd922292cca37
* Make Flattenable not virtualMathias Agopian2013-07-301-14/+26
| | | | | | | | | | | | | | | | | 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
* make the warning timout of Fence::waitForever() implicit and longerMathias Agopian2013-05-161-1/+2
| | | | | | | | | | - 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
* libgui: disallow NULL Fence pointersJamie Gennis2013-02-121-10/+24
| | | | | | | | | 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
* Fix memory leak when getting signal time for unsignaled fencesJesse Hall2013-01-141-0/+1
| | | | | Bug: 8000983 Change-Id: Ie88ed23fc5e8c95bfade364e090e90b7f070fa8e
* SurfaceFlinger: refactor frame time trackingJamie Gennis2012-11-191-0/+29
| | | | | | | | This change moves the frame time history tracking code out of Layer and into a new class called FrameTracker. It also changes the tracking to use signal timestamps from fences when available for more accurate results. Change-Id: I323c5f075c58bf86ce363b52af885ad0f6365f2b
* 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 Fence::waitForever which logs a warning timeout, and use itJesse Hall2012-10-021-0/+14
| | | | | Bug: 7217641 Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
* log more info on fence sync_merge errorMathias Agopian2012-07-301-2/+4
| | | | | | also fix a typo where the wrong value was passed to sterror. Change-Id: I4df2abe582e14c8f816b65818f4593a6bd3c23ea
* Pass fences with buffers from SurfaceTextureClientJesse Hall2012-06-301-0/+3
| | | | Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3
* Return fence to client in dequeuBufferJesse Hall2012-06-281-0/+4
| | | | Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9
* Transfer HWC release fences to BufferQueueJesse Hall2012-06-211-1/+3
| | | | | | | | | | | | | | | | | | After a HWC set, each SurfaceFlinger Layer retrieves the release fence HWC returned and gives it to the layer's SurfaceTexture. The SurfaceTexture accumulates the fences into a merged fence until the next updateTexImage, then passes the merged fence to the BufferQueue in releaseBuffer. In a follow-on change, BufferQueue will return the fence along with the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the fence to signal before returning. The releaseFence default value for BufferQueue::releaseBuffer() is temporary to avoid transient build breaks with a multi-project checkin. It'll disappear in the next change. Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
* libui: add the Fence classJamie Gennis2012-06-201-0/+95
This change adds the Fence class to libui for to wrap the libsync functionality. Change-Id: I93a31baeee608b93c14da807a32013dabf783f84