summaryrefslogtreecommitdiffstats
path: root/libs/ui
Commit message (Collapse)AuthorAgeFilesLines
* remove files that moved to frameworks/nativeMathias Agopian2012-03-0713-2121/+0
| | | | Change-Id: I140d291e520097b1148930f736823650e08488f7
* 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
* Tweak VelocityTracker.Jeff Brown2011-09-091-62/+30
| | | | | | | | | | | | Bug: 5265529 Calculate the velocity using the most recent touch sample as the point of reference instead of the oldest. This change more heavily weights recent touch samples and reduces the sample time window used for calculation. This significantly improves the accuracy of fling gesture detection. Change-Id: Ib1940933e786e5f6a731552a99bcd9400741d55f
* revert last change to EGLUtils::selectConfigForPixelFormatMathias Agopian2011-08-151-39/+19
| | | | | | EGLUtils::selectConfigForPixelFormat is only used by command line tests and it simply selects a config based on the EGL_NATIVE_VISUAL_ID.
* Merge "Refactor input reader to add stylus support. Bug: 5064702"Jeff Brown2011-08-012-45/+17
|\
| * Refactor input reader to add stylus support.Jeff Brown2011-07-312-45/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 5064702 Introduced the concept of an InputListener to further decouple the InputReader from the InputDispatcher. The InputListener exposes just the minimum interface that the InputReader needs to communicate with the outside world. The InputReader passes arguments to the InputListener by reference, which makes it easy to queue them up. Consolidated all of the InputReader locks into one simple global Mutex. The reason this wasn't done before was due to potential re-entrance in outbound calls to the InputDispatcher. To fix this, the InputReader now queues up all of the events it wants to send using a QueuedInputListener, then flushes them outside of the critical section after all of the event processing is finished. Removing all of the InputMapper locks greatly simplifies the implementation. Added tests for new stylus features such as buttons, tool types, and hovering. Added some helpers to BitSet32 to handle common code patterns like finding the first marked bit and clearing it. Fixed a bug in VelocityTracker where the wrong pointer trace could get cleared when handling ACTION_POINTER_DOWN. Oops. Changed PointerCoords so it no longer stores useless zero axis values. Removed editAxisValue because it is not very useful when all zero value axes are absent and therefore cannot be edited in place. Added dispatch of stylus hover events. Added support for distance and tool types. Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
* | Merge "connect/disconnect is now called from our EGL wrapper"Mathias Agopian2011-08-011-0/+2
|\ \
| * | connect/disconnect is now called from our EGL wrapperMathias Agopian2011-08-011-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | the original connect/disconnect hooks are deprecated and replace by api_connect/api_disconnect. the original hooks are no no-ops. api_connect/api_disconnect is now only called from the android framework. Bug: 5057915 Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
* | improve GraphicAllocator dump methodMathias Agopian2011-07-291-5/+17
|/ | | | | | | | GraphicAllocator debugging cannot deal with custom HAL formats. make this more obvious in the log. Change-Id: I202e58a7f213f32e725aa4eac62cdf6e50ca5894
* Fix uses of all-subdir-makefilesYing Wang2011-07-271-1/+1
| | | | | | | | We should use all-makefiles-under instead. all-subdir-makefiles can be used only before any "include" statement. Before this change, both subdirs were actually not included. Change-Id: I6bf35d07f294a5012c9322096f999ac26e37432f
* Fix a few issues with NATIVE_WINDOW_TRANSFORM_HINTMathias Agopian2011-07-211-21/+7
| | | | | | | | | - fixed uninitialized variable - set hint to indentity when transform is too complex - make sure FrameBufferNativeWindow doesn't fail on needed perform commands Bug: 4487161 Change-Id: I7cb2b0869b72404732eca7cb2d145ff669e2ed9b
* implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an ↵Mathias Agopian2011-07-191-0/+12
| | | | | | | optimal buffer orientation" Bug: 4487161 Change-Id: I883f34efe542c2a566d04966f873374f40c50092
* Add set_scaling_mode() to ANativeWindow.Mathias Agopian2011-07-191-5/+25
| | | | | | | This allows to specify the scaling mode independently from the buffer size. Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
* move lock/unlock implementaion outside of Surface into SurfaceTextureClientMathias Agopian2011-07-151-0/+4
| | | | | | | | | | This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work with ANativeWindows implemented by Surface and SurfaceTextureClient. Also, Surface now inherits directly from SurfaceTextureClient. Bug: 5003724 Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
* Provide more descriptive name for InputChannel ashmem.Jeff Brown2011-07-131-1/+3
| | | | Change-Id: I4307de9f717ac4810b1b91ee0c1a3899325acf71
* Merge "Remove the simulator target from all makefiles. Bug: 5010576"Jeff Brown2011-07-122-8/+0
|\
| * Remove the simulator target from all makefiles.Jeff Brown2011-07-112-8/+0
| | | | | | | | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* | EGL: fix the ANativeWindow size/fmt overrideJamie Gennis2011-07-111-0/+1
|/ | | | | | | | | | | | | | | | | | | This change fixes how the Android EGL layer overrides the size and format of an ANativeWindow in eglCreateWindowSurface. The new behavior is to leave the size untouched when overriding the format. The previous behavior was to reset the ANativeWindow to use the default size set by the ANativeWindow implementation. It also adds two new 'perform' methods to the ANativeWindow interface: set_buffers_dimensions and set_buffers_format, and redefines the behavior of set_buffers_geometry to be the combination of these two new methods. Additionally, this change adds an error check for the return value of the new native_window_set_buffers_format call, which required adding a (stub) handler for to FramebufferNativeWindow. Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
* Fix EGLUtils::selectConfigForPixelFormat()Mathias Agopian2011-07-081-19/+39
| | | | | | | | | | | | | | | - renderscript now calls EGL directly instead of relying on this function - surfaceflinger also does its own EGLConfig selection - selectConfigForPixelFormat stays for legacy reason (many tests use it) but it now only tries to match the alpha channel of the format rather than the format itself. this will allow implementations who don't support the exact formats defined in the HAL to work properly. Bug: 4998223 Change-Id: Ic664dfc14d5072a514b6f77a115d1521bfc1578f
* Merge "Improve input event consistency invariants."Jeff Brown2011-06-281-1/+2
|\
| * Improve input event consistency invariants.Jeff Brown2011-06-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixed some issues where inconsistent streams of events could be generated by the dispatcher, particularly when switching from hovering with one device to hovering with another. Fixed a bug where the touch pad would fail to generate a new HOVER_MOVE following a tap event. As a result, the hover event stream would not resume until the user touched the touch pad again. Change-Id: I444dce84641fb12e56a0af84c931520771d6c493
* | Remove native EventRecurrence parserAndy McFadden2011-06-282-485/+0
|/ | | | | | | | Switch over to the new parser. Bug 4575374 Change-Id: If78d8042fb266182900398f7fc464a048c779966
* am 61220e88: am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: ↵Jeff Brown2011-06-071-9/+0
|\ | | | | | | | | | | | | 4364920" into honeycomb-mr2 * commit '61220e880ac4d9d76b7fd50744439e68e929c697': Revert velocity damping. Bug: 4364920
| * Revert velocity damping.Jeff Brown2011-06-061-9/+0
| | | | | | | | | | | | | | | | | | | | Bug: 4364920 Velocity damping proved to be a bad idea because it would cause a significant ramp in velocity at the beginning of a gesture, instead of the desired smooth behavior. Oh well. Change-Id: Ie631946f47ef2492bd71fbed1ab44bbb39a875a8
* | am 56503b8d: am 8186a5f0: am 10c3f367: Merge "Implement pointer ↵Jeff Brown2011-06-031-0/+89
|\ \ | |/ | | | | | | | | | | acceleration." into honeycomb-mr2 * commit '56503b8ddfe5c82407da32e18061e725f668432d': Implement pointer acceleration.
| * Implement pointer acceleration.Jeff Brown2011-06-021-0/+89
| | | | | | | | | | Bug: 4124987 Change-Id: I1f31a28f1594c55302ccabe13fe3ca6d2ff71d50
| * Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)Jeff Brown2011-05-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new PointerIcon API (hidden for now) for loading pointer icons. Fixed a starvation problem in the native Looper's sendMessage implementation which caused new messages to be posted ahead of old messages sent with sendMessageDelayed. Redesigned the touch pad gestures to be defined in terms of more fluid finger / spot movements. The objective is to reinforce the natural mapping between fingers and spots which means there must not be any discontinuities in spot motion relative to the fingers. Removed the SpotController stub and folded its responsibilities into PointerController. Change-Id: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e