summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Binder linkage no longer depends on JNI objrefs as persistent tokens"Christopher Tate2011-02-251-1/+1
| | | | This reverts commit c2d55dd89743c8a38deb809f3cdf1ad2d1dbac2b.
* Merge "Fix a wp<> bug where the owner ID would be wrong"Mathias Agopian2011-02-242-11/+10
|\
| * Fix a wp<> bug where the owner ID would be wrongMathias Agopian2011-02-242-11/+10
| | | | | | | | | | | | | | this was introduced recently. we make sure to use the correct owner id (the sp) instead of the wp. Change-Id: I78fdc6ec0c2d3e687278b70442d74d1924b512a2
* | Merge "Fix some issues with RefBase debugging."Mathias Agopian2011-02-243-189/+325
|\ \ | |/
| * Fix some issues with RefBase debugging.Mathias Agopian2011-02-233-189/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First slipt sp<> out of RefBase into StrongPointer.h so it can be reused more easily and to make it clear that it doesn't require RefBase. Note: the rest of the change only affects the system when DEBUG_REFS is enabled. The main problem we fix here is that the owner id associated with each reference could get out of date when a sp<> or wp<> was moved, for instance when they're used in a Vector< >. We fix this issue by calling into RefBase::moveReferences from a template specialization for sp<TYPE> and wp<TYPE> of the type helpers. RefBase::moveReferences() has then a chance to update the owner ids. There is a little bit of trickery to implement this generically in RefBase, where we need to use a templatized functor that can turn a sp<TYPE>* casted to a void* into a RefBase*. Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS currently set to 0 by default as there seem to be an issue with sp<ANativeWindow> which trips the sanity checks. Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
* | Merge "Binder linkage no longer depends on JNI objrefs as persistent tokens"Christopher Tate2011-02-241-1/+1
|\ \
| * | Binder linkage no longer depends on JNI objrefs as persistent tokensChristopher Tate2011-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two areas that have changed to eliminate the assumption that local jobject references are both canonical and persistent: 1. JavaBBinderHolder no longer holds onto and reuses it parent object reference per se. Since the underlying JavaBBinder object holds a real global ref, this was redundant anyway. Now, for purposes of its transient need to perform JNI operations, it simply uses the current jobject ref(s) passed during method invocation, and no longer attempts to hold these refs beyond the scope of a single invocation. 2. Binder obituaries no longer assume that a jobject reference to a recipient will always compare == as a 32-bit value with any future reference to the same object. The implementation now asks Dalvik whether object references match. Bug 2090115 Change-Id: If62edd554d0a9fbb2d2977b0cbf8ad7cc8e2e68d
* | | Merge "Bug 3362814 Fix SMP race in access to mRequestExit"Glenn Kasten2011-02-241-1/+2
|\ \ \ | |_|/ |/| |
| * | Bug 3362814 Fix SMP race in access to mRequestExitGlenn Kasten2011-02-231-1/+2
| |/ | | | | | | | | | | Also fix an unlikely SMP race in access to mHoldSelf on entry to _threadLoop. Change-Id: I6cbc0b94739c7dd5e77e8a5ba0da22cdc0b1a4db
* | Remove RefBase.h dependency on TextOutput.hMathias Agopian2011-02-221-5/+6
|/ | | | Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
* Add new axes for joysticks and mouse wheels.Jeff Brown2011-02-194-41/+68
| | | | | | | | | | | | | | | | | | Added API on InputDevice to query the set of axes available. Added API on KeyEvent and MotionEvent to convert keycodes and axes to symbolic name strings for diagnostic purposes. Added API on KeyEvent to query if a given key code is a gamepad button. Added a new "axis" element to key layout files to specify the mapping between raw absolute axis values and motion axis ids. Expanded the axis bitfield to 64bits to allow for future growth. Modified the Makefile for keyboard prebuilts to run the keymap validation tool during the build. Added layouts for two game controllers. Added default actions for game pad button keys. Added more tests. Fixed a bunch of bugs. Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
* Fix a regression with MotionEvent parceling.Jeff Brown2011-02-171-25/+26
| | | | | | Also added some more unit tests. Change-Id: I413654294d1a998eec056884e6df5eaa50f3daf4
* Add support for arbitrary axes in MotionEvents.Jeff Brown2011-02-151-47/+135
| | | | | | | | | | | This change makes it possible to extend the set of axes that are reported in MotionEvents by defining new axis constants. The MotionEvent object is now backed by its C++ counterpart to avoid having to maintain multiple representations of the same data. Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
* am c6c3e77d: am b66b7a2c: Merge "fix [3408713] Dialog window invisible ↵Mathias Agopian2011-02-101-14/+48
|\ | | | | | | | | | | | | sometimes" into honeycomb * commit 'c6c3e77d4d5cd8de3b1a56bdffdfd42774849512': fix [3408713] Dialog window invisible sometimes
| * am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into ↵Mathias Agopian2011-02-101-14/+48
| |\ | | | | | | | | | | | | | | | | | | honeycomb * commit 'b66b7a2c183a1423ea629d4f73ed95f9b87d54b7': fix [3408713] Dialog window invisible sometimes
| | * fix [3408713] Dialog window invisible sometimesMathias Agopian2011-02-091-14/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | weak pointer comparison operators were implemented wrong, they were using the internal "unsafe" pointer. We could end up with two "equal" weak pointer pointing to different objects. this caused KeyedVector keyed by weak pointer to work incorrectly, in turn causing a window that just got added to a list to be immediately removed. Change-Id: Ib191010c39aafa9229109e4211f6c3b2b2f9696d
* | | am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to ↵Jamie Gennis2011-02-023-0/+16
|\ \ \ | |/ / | | | | | | | | | | | | | | | SurfaceTextureClient." into honeycomb * commit '421d94c20321e1de528416b279bf148baba47b39': Pass the IGraphicBufferAlloc to SurfaceTextureClient.
| * | am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." ↵Jamie Gennis2011-02-023-0/+16
| |\ \ | | |/ | | | | | | | | | | | | | | | into honeycomb * commit 'ecb4b3f02340e21eefabbea78559e85ec7ee0089': Pass the IGraphicBufferAlloc to SurfaceTextureClient.
| | * Pass the IGraphicBufferAlloc to SurfaceTextureClient.Jamie Gennis2011-02-023-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change passes a reference to the IGraphicBufferAlloc binder object to SurfaceTextureClient objects. When STC objects are created they query their associated ISurfaceTexture object for the IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers. Having the SurfaceTextureClient hold this reference prevents the GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers before the SurfaceTextureClient is done with them. Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c related-bug: 3362519
* | | am 09443aeb: am 62884505: Merge "Reset ANativeWindow crop on buffer geometry ↵Jamie Gennis2011-01-301-0/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | changes." into honeycomb * commit '09443aeb6470d66f5bc1938b70d74b3e2f9bbbb9': Reset ANativeWindow crop on buffer geometry changes.
| * | am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." ↵Jamie Gennis2011-01-301-0/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | into honeycomb * commit '628845056282a0c5b1a212ce5aeeaac092b91ec8': Reset ANativeWindow crop on buffer geometry changes.
| | * Reset ANativeWindow crop on buffer geometry changes.Jamie Gennis2011-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the ANativeWindow API and the two implementations to reset the window's crop rectangle to be uncropped when the window's buffer geometry is changed. Bug: 3359604 Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
* | | am 371de969: am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output ↵Dianne Hackborn2011-01-291-0/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | from aapt d" * commit '371de9695508073fbbde8181eb230e99cb045206': Normalize output from aapt d
| * | am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"Dianne Hackborn2011-01-291-0/+1
| |\ \ | | |/ | |/| | | | | | | * commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234': Normalize output from aapt d
| | * am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"Dianne Hackborn2011-01-291-0/+1
| | |\ | | | | | | | | | | | | | | | | * commit 'a30063d80c08434ac3c7316f338c6d54110449ab': Normalize output from aapt d
| | | * Merge "Normalize output from aapt d"Dianne Hackborn2011-01-291-0/+1
| | | |\
| | | | * Normalize output from aapt dShachar Shemesh2011-01-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed regardless of the content of the strings. Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf
| | * | | am 239fd805: Merge "fix [3361121] hang in glClear() - device unresponsive, ↵Mathias Agopian2011-01-251-7/+1
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OTA fails (DO NOT MERGE)" into gingerbread * commit '239fd805ef7c0e4116b0a89e20caaf287e91f017': fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
| | | * | | fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)Mathias Agopian2011-01-251-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally we never want to lock a buffer for write access if it is at the "head" on the surfaceflinger side. The only exception (1) is when the buffer is not currently in use AND there is at least one queued buffer -- in which case, SurfaceFlinger will never use said buffer anymore, because on the next composition around, it will be able to retire the first queued buffer. The logic above relies on SurfaceFlinger always retiring and locking a buffer before composition -- unfortunately this didn't happen during a screenshot. This could leave us in a situation where a buffer is locked by the application for write, and used by SurfaceFlinger for texturing, causing a hang. Here, we fix this issue by never assuming the exception (1), it was intended as an optimization allowing ANativeWindow::lockBuffer() to return sooner and was justified when most of SF composition was done in software. The actual buffer locking is now ensured by gralloc. We could have handled screenshots in a similar way to a regular composition, but it could have caused glitches on screen, essentially, taking a screenshot could cause to skip a frame. now that we removed the notion of a "inUse" buffer in surfaceflinger a lot of code can be simplified / removed. noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete" is also gone.
| | * | | | am d3fcd0a1: Merge "minor clean-up. SurfaceFlinger doesn\'t need ↵Mathias Agopian2011-01-251-1/+1
| | |\ \ \ \ | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libpixelflinger.so. (DO NOT MERGE)" into gingerbread * commit 'd3fcd0a1c923498921107bb44fbc8b24582a170a': minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
| | | * | | minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)Mathias Agopian2011-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
| | * | | | am 265cf2e7: Merge "Fix getSwitchState."Jeff Brown2011-01-221-0/+9
| | |\ \ \ \ | | | | |/ / | | | |/| | | | | | | | | | | | | | * commit '265cf2e76bef9ee369a7d43d567a22a0c39355ef': Fix getSwitchState.
| | | * | | Fix getSwitchState.Jeff Brown2011-01-191-0/+9
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN because SwitchInputMapper::getSources() returns 0 which cannot match any source mask including AINPUT_SOURCE_ANY. As a result initial lid switch detection is broken. This change adds a new source constant AINPUT_SOURCE_SWITCH that indicates that the source has switches. Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
| | * | | am 41395459: Merge "Filter virtual keys after touches. (DO NOT MERGE)" into ↵Jeff Brown2011-01-181-0/+17
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | gingerbread * commit '41395459e676cf9ab4059e08446656f145662c2d': Filter virtual keys after touches. (DO NOT MERGE)
| | | * | Filter virtual keys after touches. (DO NOT MERGE)Jeff Brown2011-01-111-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new virtualKeyQuietTimeMillis configuration resource that sets the duration for which virtual keys will be dropped after recent touches on screen. The default value is 0; it is intended to be overridden per device using a resource overlay. This change is designed to help in two cases: 1. Swipes from touchscreen into virtual key area. 2. Accidental taps in virtual key area while using on-screen keyboard. Bug: 3089163 Change-Id: Id6733c83c2e2bc8d9553aa0e5c1fd74b741bec6e
| | * | | am a2977c38: Merge changes Ie03796ae,Ide3e980a into gingerbreadMathias Agopian2010-12-072-2/+16
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | * commit 'a2977c383d363e1e88a5b36230b1fa4c312807d2': [3171580] SurfaceFlinger Bypass mode. (DO NOT MERGE) [3171580] Add transform field to native buffers. (DO NOT MERGE)
| | | * | [3171580] Add transform field to native buffers. (DO NOT MERGE)Mathias Agopian2010-12-032-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This field indicate how the content of the buffer needs to be transformed. Change-Id: Ide3e980a90599e931406135693231276626adbbb
* | | | | Protected surface APIGlenn Kasten2011-01-282-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be used by DRM framework, implemented by display HAL Change-Id: I054a07a94f4d5dbe792f3a597e2e49a100d90eb2
* | | | | am 12b2dc90: am b1e0a870: Merge "Fix crashes caused by some input devices." ↵Jeff Brown2011-01-251-1/+3
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | into honeycomb * commit '12b2dc90883ef4f930a17907acdef3677b0598a5': Fix crashes caused by some input devices.
| * | | | Fix crashes caused by some input devices.Jeff Brown2011-01-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The touch screen sometimes reports more than 10 pointers even though that's all we asked for. When this happens, we start dropping events with more than 10 pointers. This confuses applications and causes them to crash. Raised the limit to 16 pointers. Bug: 3331247 The default behavior was to identify all touch devices as touch screens. External devices that are plugged in are more likely to be touch pads not attached to a screen. Changed the default to be a touch pad and renamed some internal constants to avoid confusion. A certain mouse happens to also behave like a touch pad. That caused problems because we would see multiple concurrent traces of motion events coming from the same input device so we would batch them up. Added code to ensure that we don't batch events unless they come from the same *source* in addition to coming from the same *device*. Due to batching or misbehaving drivers, it's possible for the set of pointer ids to be different from what we expect when it comes time to split motion events across windows. As a result, we can generate motion events with 0 pointers. When we try to deliver those events, we cause an error in the InputTransport so we tear down the InputChannel and kill the application. Added code to check out assumption about pointer ids and drop the event gracefully instead. Patched up the tests to take into account the change in default behavior for identifying touch screens and touch pads. Change-Id: Ic364bd4cb4cc6335d4a1213a26d6bdadc7e33505
* | | | | am 2acb67ec: am 67005b05: Merge "Use optimized display lists for all ↵Chet Haase2011-01-241-0/+33
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | hwaccelerated rendering" into honeycomb * commit '2acb67ec9fe34316231519373f59dfb76c03d57b': Use optimized display lists for all hwaccelerated rendering
| * | | | Use optimized display lists for all hwaccelerated renderingChet Haase2011-01-241-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, display lists were used only if hardware acceleration was enabled for an application (hardwareAccelerated=true) *and* if setDrawingCacheEnabled(true) was called. This change makes the framework use display lists for all views in an application if hardware acceleration is enabled. In addition, display list renderering has been optimized so that any view's recreation of its own display list (which is necessary whenever the visuals of that view change) will not cause any other display list in its parent hierarchy to change. Instead, when there are any visual changes in the hierarchy, only those views which need to have new display list content will recreate their display lists. This optimization works by caching display list references in each parent display list (so the container of some child will refer to its child's display list by a reference to the child's display list). Then when a view needs to recreate its display list, it will do so inside the same display list object. This will cause the content to get refreshed, but not the reference to that content. Then when the view hierarchy is redrawn, it will automatically pick up the new content from the old reference. This optimization will not necessarily improve performance when applications need to update the entire view hierarchy or redraw the entire screen, but it does show significant improvements when redrawing only a portion of the screen, especially when the regions that are not refreshed are complex and time- consuming to redraw. Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
* | | | | am 612d7f3c: am a423d868: Merge "clean-up unneeded code" into honeycombMathias Agopian2011-01-201-8/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '612d7f3c092ec2c4a2ae44cb09d6dfb4e525a659': clean-up unneeded code
| * | | | Merge "clean-up unneeded code" into honeycombMathias Agopian2011-01-201-8/+1
| |\ \ \ \
| | * | | | clean-up unneeded codeMathias Agopian2011-01-201-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now that we removed the notion of a "inUse" buffer in surfaceflinger a lot of code can be simplified / removed. noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete" is also gone. Change-Id: I210413d4c8c0998dae05c8620ebfc895d3e6233d
* | | | | | am 5f668c6e: am 8b9df978: Merge "Fix getSwitchState." into honeycombJeff Brown2011-01-191-0/+9
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | * commit '5f668c6e6bb2515325632691a804a7c8f24ebb09': Fix getSwitchState.
| * | | | | Fix getSwitchState.Jeff Brown2011-01-191-0/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN because SwitchInputMapper::getSources() returns 0 which cannot match any source mask including AINPUT_SOURCE_ANY. As a result initial lid switch detection is broken. This change adds a new source constant AINPUT_SOURCE_SWITCH that indicates that the source has switches. Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
* | | | | Merge "Add joystick support to framework."Jeff Brown2011-01-171-0/+16
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add joystick support to framework.Jeff Brown2011-01-171-0/+16
| | | | | | | | | | | | | | | | | | | | Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
* | | | | Merge "integrate videoeditor preview player." into honeycombDharmaray Kundargi2011-01-171-0/+6
|\ \ \ \ \