summaryrefslogtreecommitdiffstats
path: root/libs/ui
Commit message (Collapse)AuthorAgeFilesLines
* More native input event dispatching.Jeff Brown2010-06-213-135/+341
| | | | | | | | | | | Added ANRs handling. Added event injection. Fixed a NPE ActivityManagerServer writing ANRs to the drop box. Fixed HOME key interception. Fixed trackball reporting. Fixed pointer rotation in landscape mode. Change-Id: I50340f559f22899ab924e220a78119ffc79469b7
* Even more native input dispatch work in progress.Jeff Brown2010-06-178-66/+747
| | | | | | | | | | | | | | | | | Added more tests. Fixed a regression in Vector. Fixed bugs in pointer tracking. Fixed a starvation issue in PollLoop when setting or removing callbacks. Fixed a couple of policy nits. Modified the internal representation of MotionEvent to be more efficient and more consistent. Added code to skip/cancel virtual key processing when there are multiple pointers down. This helps to better disambiguate virtual key presses from stray touches (such as cheek presses). Change-Id: I2a7d2cce0195afb9125b23378baa94fd2fc6671c
* Merge "More work in progress on native events." into gingerbreadJeff Brown2010-06-153-219/+442
|\
| * More work in progress on native events.Jeff Brown2010-06-153-219/+442
| | | | | | | | | | | | | | | | Refactored the code to eliminate potential deadlocks due to re-entrant calls from the policy into the dispatcher. Also added some plumbing that will be used to notify the framework about ANRs. Change-Id: Iba7a10de0cb3c56cd7520d6ce716db52fdcc94ff
* | Support for multiple testsJeff Brown2010-06-141-4/+9
|/ | | | | | | The build system enforces some invariants that were being ignored before. Change-Id: Ie7675042af7f961a507386c13b2a0b592b591af8
* Fix include paths.Jeff Brown2010-06-132-3/+0
| | | | Change-Id: Ifda45688f9f02710a74d5d7a7d902bacf1441e2e
* Native input dispatch rewrite work in progress.Jeff Brown2010-06-1311-80/+4361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old dispatch mechanism has been left in place and continues to be used by default for now. To enable native input dispatch, edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy. Includes part of the new input event NDK API. Some details TBD. To wire up input dispatch, as the ViewRoot adds a window to the window session it receives an InputChannel object as an output argument. The InputChannel encapsulates the file descriptors for a shared memory region and two pipe end-points. The ViewRoot then provides the InputChannel to the InputQueue. Behind the scenes, InputQueue simply attaches handlers to the native PollLoop object that underlies the MessageQueue. This way MessageQueue doesn't need to know anything about input dispatch per-se, it just exposes (in native code) a PollLoop that other components can use to monitor file descriptor state changes. There can be zero or more targets for any given input event. Each input target is specified by its input channel and some parameters including flags, an X/Y coordinate offset, and the dispatch timeout. An input target can request either synchronous dispatch (for foreground apps) or asynchronous dispatch (fire-and-forget for wallpapers and "outside" targets). Currently, finding the appropriate input targets for an event requires a call back into the WindowManagerServer from native code. In the future this will be refactored to avoid most of these callbacks except as required to handle pending focus transitions. End-to-end event dispatch mostly works! To do: event injection, rate limiting, ANRs, testing, optimization, etc. Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
* allow re-targetting of surfacesMathias Agopian2010-06-081-0/+3
| | | | | | | | | Surfaces can now be parcelized and sent to remote processes. When a surface crosses a process boundary, it looses its connection with the current process and gets attached to the new one. Change-Id: I39c7b055bcd3ea1162ef2718d3d4b866bf7c81c0
* split surface management from surface's buffers managementMathias Agopian2010-06-041-13/+3
| | | | Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
* fix a bug where fading in/out of opaque 32-bits windows wasn't workingMathias Agopian2010-06-011-3/+12
| | | | | | | | | | | opaque 32-bits windows are now allocated as RGBX_8888 buffers and SurfaceFlinger always uses GL_MODULATE instead of trying to optimize to GL_REPLACE when possible (makes no sense on h/w accelerated GL). we still have a small hack for devices that don't support RGBX_8888 in their gralloc implementation where we revert to RGBA_8888.
* when a zero dimension buffer is allocated, turn the allocation intoMathias Agopian2010-04-151-10/+9
| | | | | | a 1x1 buffer instead of Nx1 (or 1xN) Change-Id: I27eeb15e83e13002dd9405f4e52b54f7dffc0fe7
* fix [2545826] calling into gralloc with external lock heldMathias Agopian2010-03-251-4/+0
| | | | Change-Id: I2d0e017382404c684c768a0dd0423d574213f10a
* implement connect/disconnect in our native_window_t implementationsMathias Agopian2010-03-111-0/+2
| | | | | | | | the framebuffer implementation doesn't do anything special with this but the surfaceflinger implementation makes sure the surface is not used by two APIs simultaneously. Change-Id: Id4ca8ef7093d68846abc2ac814327cc40a64b66b
* Calculate bitmask array sizes correctly in the EventHubChristopher Tate2010-03-041-8/+8
| | | | | | | | | | | We've gotten lucky to date: the previous calculation of bitmask array sizes, (maxval+1)/8 only works properly when 'maxval' is one less than a multiple of 8. Fortunately, this has either been the case for us, or there has been sufficient 'unused' space at the end of the defined max value range that we haven't wound up overreading/overwriting the allocated buffers. Change-Id: I563a93a86644ab9f19489565e06c28e06bb53abc
* Fix #2489986 : The key bitmask needs to cover all possible keysChristopher Tate2010-03-041-1/+1
| | | | Change-Id: Ieebd2f879e6b6fbc0388655dd66f34be89e809a0
* Maybe fix issue #2482201: Paired bluetooth device looks like a qwerty keyboardDianne Hackborn2010-03-021-14/+12
| | | | | | | | We now only consider a device to be a default keyboard if its name has "-keypad". A hack, but whatever. Also add some debug logging for the input state to help identify such issues in the future.
* remove a dependency of GraphicBuffer (libui) on Parcel (libbinder).Mathias Agopian2010-02-211-42/+83
| | | | | | | | | Add a Flattenable interface to libutils which can be used to flatten an object into bytestream + filedescriptor stream. Parcel is modified to handle Flattenable. And GraphicBuffer implements Flattenable. Except for the overlay classes libui is now independent of libbinder.
* Remove a dependency of Region (libui) on Parcel (libbinder).Mathias Agopian2010-02-171-44/+9
|
* fix a bug I introduced recently where YUV formats would crash the systemMathias Agopian2010-02-161-4/+35
|
* get rid off the YUV formats at the libui layerMathias Agopian2010-02-161-3/+0
|
* split libsurfaceflinger_client and libcamera_client out of libuiMathias Agopian2010-02-1114-3742/+1
|
* Merge "Remove some logs."Wu-cheng Li2010-02-102-2/+2
|\
| * Remove some logs.Wu-cheng Li2010-02-102-2/+2
| |
* | Add exposure compensation parameter.Wu-cheng Li2010-02-091-0/+2
|/ | | | bug:2375993
* Add float support for set and get in CameraParameters.Wu-cheng Li2010-01-311-0/+14
| | | | | bug:2375989 bug:2375987
* Add focal length and view angle API.Wu-cheng Li2010-01-301-0/+3
| | | | bug:2375989,2375987
* Merge "Add support for setting camera display orientation."Chih-Chung Chang2010-01-271-20/+0
|\
| * Add support for setting camera display orientation.Chih-Chung Chang2010-01-261-20/+0
| |
* | Revert "Fix failure to open AVRCP input device due to EPERM."Nick Pelly2010-01-261-7/+1
|/ | | | This reverts commit e6b1bbd8acca3f6e174c24cf4eb23a66db2d08a2.
* am 425324e9: am e834722f: Merge "Fix failure to open AVRCP input device due ↵Nick Pelly2010-01-251-2/+8
|\ | | | | | | | | | | | | | | | | to EPERM." into eclair Merge commit '425324e97bba75cd69bb6c81de6248529540e6fe' * commit '425324e97bba75cd69bb6c81de6248529540e6fe': Fix failure to open AVRCP input device due to EPERM.
| * Fix failure to open AVRCP input device due to EPERM.Nick Pelly2010-01-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sleep for 100us and try to open the input device again if it fails, with a maximum of 10 attempts. We need the retry logic because setting permissions on a new input device is racy. The init process watches for new input device (via uevent) and sets the permission on them in devices.c:make_device(). However at the same time EventHub.cpp watches for new input devices from the system_server process, and immediately tries to open them. I can't see a simple way to avoid this race condition. As best as I can tell this race condition has always exisited. There must have been some timing change that happened recently that causes us to hit this race condition much more often. See repro notes in referenced bug. Bug: 2375632
* | Change key to KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES for consistency.Wu-cheng Li2010-01-251-1/+1
| | | | | | | | bug:2375986
* | Merge "return an error when Surface::lock() is called while the surface is ↵Mathias Agopian2010-01-221-3/+11
|\ \ | | | | | | | | | already locked."
| * | return an error when Surface::lock() is called while the surface is already ↵Mathias Agopian2010-01-221-3/+11
| |/ | | | | | | locked.
* | Add an orientation parameter for overlay, so we can do camera preview in ↵Chih-Chung Chang2010-01-211-2/+4
|/ | | | portrait mode.
* fix some aspects of [2258746] native crash in launcher2Mathias Agopian2009-11-131-29/+19
| | | | | | Surface::validate() could sometimes dereference a null pointer before checking it wasn't null. This will prevent the application to crash when given bad parameters or used incorrectly. However, the bug above probably has another cause.
* Revert change incorrectly submitted as part of change #32153.Romain Guy2009-11-051-2/+0
| | | | Change-Id: I31c52beff03c0d038a257fc151eff3b8da60eddc
* Prevent crash in Home when using widgets whose ids collide with Home'sRomain Guy2009-11-051-0/+2
| | | | | | | | | | resources. Bug #2228943. Approved by mcleron, triaged by ryanpc. Change-Id: Idf40f3b09502ae5d0d3b9a6a72c265a2de2ffca2
* fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts ↵Mathias Agopian2009-11-021-0/+8
| | | | | | | | when playing back video we lost the concept of vertical stride when moving video playback to EGLImage. Here we bring it back in a somewhat hacky-way that will work only for the softgl/mdp backend.
* fix [2143798] Need to figure out how to do videoMathias Agopian2009-10-271-5/+23
| | | | | | | | | Use EGLImageKHR instead of copybit directly. We now have the basis to use streaming YUV textures (well, in fact we already are). When/if we use the GPU instead of the MDP we'll need to make sure it supports the appropriate YUV format. Also make sure we compile if EGL_ANDROID_image_native_buffer is not supported
* fix [2182249] [MR1] valgrind error in surface flingerMathias Agopian2009-10-151-0/+7
|
* fix [2170283] SurfaceFlinger crashes on OOM.Mathias Agopian2009-10-071-0/+2
| | | | | | when running out of memory, a null handle is returned but the error code may not be set. In that case we need to return NO_MEMORY instead of NO_ERROR, so that the calling code won't try to dereference the null pointer.
* fix [2170319] gmail bulk operation checkbox latency on passionMathias Agopian2009-10-074-48/+8
| | | | | | | | | | | | | | | This also fixes [2152536] ANR in browser When SF is enqueuing buffers faster than SF dequeues them. The update flag in SF is not counted and under some situations SF will only dequeue the first buffer. The state at this point is not technically corrupted, it's valid, but just delayed by one buffer. In the case of the Browser ANR, because the last enqueued buffer was delayed the resizing of the current buffer couldn't happen. The system would always fall back onto its feet if anything -else- in tried to draw, because the "late" buffer would be picked up then.
* fix [2152536] ANR in browserMathias Agopian2009-10-062-7/+7
| | | | | | | | | | | | | | | | A window is created and the browser is about to render into it the very first time, at that point it does an IPC to SF to request a new buffer. Meanwhile, the window manager removes that window from the list and the shared memory block it uses is marked as invalid. However, at that point, another window is created and is given the same index (that just go freed), but a different identity and resets the "invalid" bit in the shared block. When we go back to the buffer allocation code, we're stuck because the surface we're allocating for is gone and we don't detect it's invalid because the invalid bit has been reset. It is not sufficient to check for the invalid bit, I should also check that identities match.
* fix [2168531] have software-only gralloc buffer side-step the HALMathias Agopian2009-10-062-10/+170
|
* fix [2167050] glTexImage2D code path buggy in SurfaceFlingerMathias Agopian2009-10-067-164/+373
| | | | | | | | | | | | | | When EGLImage extension is not available, SurfaceFlinger will fallback to using glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an extra copy. However this code path has never been exercised and had some bugs which this patch fix. Mainly the scale factor wasn't computed right when falling back on glDrawElements. We also fallback to this mode of operation if a buffer doesn't have the adequate usage bits for EGLImage usage. This changes only code that is currently not executed. Some refactoring was needed to keep the change clean. This doesn't change anything functionaly.
* Add zoom functions and sendCommand.Wu-cheng Li2009-10-062-0/+30
| | | | b2060030
* Attempt to fix [2152536] ANR in browserMathias Agopian2009-10-022-6/+15
| | | | | | | | | | | The ANR is caused by SurfaceFlinger waiting for buffers of a removed surface to become availlable. When it is removed from the current list, a Surface is marked as NO_INIT, which causes SF to return immediately in the above case. For some reason, the surface here wasn't marked as NO_INIT. This change makes the code more robust by always (irregadless or errors) setting the NO_INIT status in all code paths where a surface is removed from the list. Additionaly added more information in the logs, should this happen again.
* Change FLASH_MODE_VIDEO_LIGHT to FLASH_MODE_TORCH.Wu-cheng Li2009-09-281-1/+1
|
* Add camera parameter key constants and documentation.Wu-cheng Li2009-09-251-21/+118
|