summaryrefslogtreecommitdiffstats
path: root/libs/ui
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Show build config in dumpsys SurfaceFlingerAndy McFadden2012-09-252-1/+38
| | | | | | | | | | | | | 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
* 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
* Add a way to retrieve a Region as a SharedBufferMathias Agopian2012-08-311-0/+12
| | | | Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
* change how we store Region data internallyMathias Agopian2012-08-311-43/+30
| | | | | | | | | | | | | We used to keep the bounds of the region as a separate rectangle. Instead we now store it as the last element of the Vector<> of Rects. This has the benefit of being slightly more efficient when copying regions and reduces the overhead of small regions, but more importantly will allow us to export the underlaying SharedBuffer (eventually). Change-Id: I80790e4fb1a09a747a5616000cfef852ac4ce9e9
* don't generate a new Region when translating by 0,0Mathias Agopian2012-08-311-1/+1
| | | | | | | | since regions are copy-on-write, this prevents to duplicate the region entirely and offseting by 0,0 is fairly common. Change-Id: I9b8c286315a2e00dda01c2456397d72b5e12006b
* libgui: add some error checksJamie Gennis2012-08-301-1/+6
| | | | | | This change adds a few error checks both in the framework and in some tests. Change-Id: I2baf2676942a0dc15866e75852a775a0091ed16d
* improve [un]marshalling of non-binder objectsMathias Agopian2012-08-131-51/+23
| | | | | | | | | | | | | | | | | 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
* Merge "log more info on fence sync_merge error" into jb-mr1-devMathias Agopian2012-07-301-2/+4
|\
| * 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
* | Merge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-devEd Heyl2012-07-281-6/+12
|\ \ | |/ |/| | | | | | | | | Conflicts: include/media/hardware/CryptoAPI.h Change-Id: I84bf34edbef000558f088bbf1d1e5b55d6217d2e
| * libs/ui: Add support for triple framebuffersNaseer Ahmed2012-07-091-6/+12
| | | | | | | | Change-Id: I90dd38deeeda9a3785b87286cc7d252c6f948750
* | 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
* | Move remaining bits of lockBuffer to dequeueBufferJesse Hall2012-06-211-13/+4
| | | | | | | | | | | | | | FramebufferNativeWindow::dequeueBuffer now waits for the next buffer to be non-front in addition to being free. Change-Id: I991f154958cc6b488b1241aba83d1f95a0513b3c
* | Update ANativeWindow clients for syncJamie Gennis2012-06-202-6/+38
| | | | | | | | | | | | | | 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
* | 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
* SurfaceFlinger: add a crop to the layer stateJamie Gennis2012-05-111-1/+1
| | | | | | | | | This change adds a crop rectangle specified in window coordinates to the layer state. The all window pixels outside this crop rectangle are treated as though they were fully transparent. This change also adds the plumbing necessary for WindowManager to set that crop. Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
* libui: add the Rect::transform methodJamie Gennis2012-05-071-0/+21
| | | | | | | | This change adds a method to Rect to transform a rectangle by a graphics HAL transform. Change-Id: Ic0d0988e731bdb5662faee41a5927b1242891658 Bug: 6299171
* PixelFormat.UNKNOWN should return an error when queriedMathias Agopian2012-04-241-1/+1
| | | | | Bug: 6294260 Change-Id: Iad6f7bcbdda0a684abca6d9584da611a8b28f7ab
* fix Region const_iterator.Mathias Agopian2012-04-161-1/+9
| | | | | | | | | | - it returned an empty rect when the region was empty, instead of returning an empty list of rect. - also fixed an infinite loop when boolean_operation was given an empty list of rects Change-Id: I62225c7dcd2832025bb8f12e6cb3762f2a7b36cb
* add more tracing for buffer allocationMathias Agopian2012-02-292-0/+10
| | | | Change-Id: I8408850d0625985992ef2e2cd0c9f300b1fca293
* remove dependency on android_native{s_priv|buffer}.hMathias Agopian2012-02-242-24/+3
| | | | Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
* remove libui dependency on libEGLMathias Agopian2012-02-242-123/+0
| | | | Change-Id: I1194f04085637d5c384e134967249430cc43b6ee
* deprecate L_8, LA_88 and RGB_332 in sdkMathias Agopian2012-02-241-1/+4
| | | | | | | | | | re-add support for pixelformats L_8, LA_88 and RGB_332 in libui for backward compatibility. This may or may not fix 6058926 Bug: 6049685 Change-Id: Ic1b8b4cc994522f7fe664da64c0ef76b98bc6d53
* Merge "libui: add ability to force a framebuffer format for EGL's use"Dima Zavin2012-02-222-0/+16
|\
| * libui: add ability to force a framebuffer format for EGL's useDima Zavin2012-02-222-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | This does not actually change the framebuffer format. It merely fakes this format to surfaceflinger so that when it creates framebuffer surfaces it will use this format. It's really a giant HACK to allow interworking with buggy gralloc+GPU driver implementations. You should *NEVER* need to set this for shipping devices. Change-Id: I03eeb5b4d72838ef219df386ecc489fc20ab9cc7 Signed-off-by: Dima Zavin <dima@android.com>
* | remove libui's dependency on libpixelflingerMathias Agopian2012-02-212-18/+43
|/ | | | | | this also remove support for unused pixelformats. Change-Id: I2c759a6d2daa740f3786ed62095def8047ae933d
* frameworks/base refactoringMathias Agopian2012-02-2011-4589/+1
| | | | | | create the new libandroidfw from parts of libui and libutils Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
* frameworks/base refactoring.Mathias Agopian2012-02-179-14/+15
| | | | | | First step. Move libui includes to their new home: androidfw. Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
* Accurately track the sequence numbers of batched events.Jeff Brown2012-02-131-8/+42
| | | | | | | | | | | | | Instead of sending finished signals immediately when appending to a batch, record the chain of sequence numbers that were part of the batch and then send finished signals all at once when done. This change helps the dispatcher keep track of the true state of the application and can improve ANR detection slightly. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I463c2221e2aa8fdf1c3d670c18e39e59ab69b0db
* Enable deferred input messages to be batched.Jeff Brown2012-02-131-52/+40
| | | | | | | This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I6874d2128e880a35c6c33890c858cc6ee22af0fd
* Implement batching of input events on the consumer side.Jeff Brown2012-02-133-80/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To support this feature, the input dispatcher now allows input events to be acknowledged out-of-order. As a result, the consumer can choose to defer handling an input event from one device (because it is building a big batch) while continuing to handle input events from other devices. The InputEventReceiver now sends a notification when a batch is pending. The ViewRoot handles this notification by scheduling a draw on the next sync. When the draw happens, the InputEventReceiver is instructed to consume all pending batched input events, the input event queue is fully processed (as much as possible), and then the ViewRoot performs traversals as usual. With these changes in place, the input dispatch latency is consistently less than one frame as long as the application itself isn't stalled. Input events are delivered to the application as soon as possible and are handled as soon as possible. In practice, it is no longer possible for an application to build up a huge backlog of touch events. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I42c01117eca78f12d66d49a736c1c122346ccd1d
* Dispatch multiple touch events in parallel.Jeff Brown2012-02-131-0/+13
| | | | | | | | | | | | | | | | | | This change enables the input dispatcher to send multiple touch events to an application without waiting for them to be acknowledged. Essentially this is a variation on the old streaming optimization but it is much more comprehensive. Event dispatch will stall as soon as 0.5sec of unacknowledged events are accumulated or a focused event (such as a key event) needs to be delivered. Streaming input events makes a tremendous difference in application performance. The next step will be to enable batching of input events on the client side once again. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I025df90c06165d719fcca7f63eed322a5cce4a78
* Rewrite input transport using sockets.Jeff Brown2012-02-133-867/+270
| | | | | | | | | | | | Since we will not longer be modifying events in place, we don't need to use an ashmem region for input. Simplified the code to instead use a socket of type SOCK_SEQPACKET. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
* Preliminary support for clipRect(Rect, Op)Romain Guy2012-02-071-0/+19
| | | | | | | This adds basic support for clip regions. It is currently disabled at compile time. Enabling clip regions will require setting up a stencil buffer. Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
* remove dead/usnused codeMathias Agopian2012-01-113-108/+0
| | | | Change-Id: I6fa2bc6ee01790abd2c1533f043d61a5e5c8d26e
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-0810-90/+90
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-063-7/+7
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-038-76/+76
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Eliminate hw.keyboards system properties.Jeff Brown2011-11-152-55/+0
| | | | | | | | | | | | Stop using system properties to publish information about the key character map path. Instead, we can retrieve it on demand by asking the window manager. It was possible to exhaust the supply of system properties when repeatedly adding and removing input devices. Bug: 5532806 Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
* Region cannot handle malformed Rects. Abort the Region op in that case.Mathias Agopian2011-09-261-0/+1
| | | | | Bug: 5331198, 5334829 Change-Id: Ib1fdbf6fb291e7f1191ccfe16b5ff29d73e7a474
* Make sure Region handles invalid rectanglesMathias Agopian2011-09-191-0/+5
| | | | | | | | | the boolean operation code assumes rects are valid and could go into an infinite loop if not. make sure we abort before that happens. Bug: 5331198, 5334829 Change-Id: Iee4e3b838ecf504ef21f7447fd2e34a56e7dc3f8
* Can't stop the fling!Jeff Brown2011-09-161-0/+2
| | | | | | | | | | | | | Bug: 5335420 Fixed a bug in VelocityTracker where the output velocity was not being set to zero when not available. Added a condition to ensure that the velocity is at least the minimum fling velocity before continuing. If not, then the user is trying to stop the fling and scroll more precisely. Change-Id: I36634b0c3f7a9a09cf20c33f71d41163a8e33eed
* Velocity Tracker II: The Revenge of Velocity TrackerJeff Brown2011-09-141-45/+280
| | | | | | | | | | | | | | | | | | | | | Bug: 5265529 Rewrote the velocity tracker to fit a polynomial curve to pointer movements using least squares linear regression. The velocity is simply the first derivative of this polynomial. Clients can also obtain an Estimator that describes the complete terms of the estimating polynomial including the coefficient of determination which provides a measure of the quality of the fit (confidence). Enhanced PointerLocation to display the movement curve predicted by the estimator in addition to the velocity vector. By default, the algorithm computes a 2nd degree (quadratic) polynomial based on a 100ms recent history horizon. Change-Id: Id377bef44117fce68fee2c41f90134ce3224d3a1