summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Revert "Add temporary functor lifetime logging"" into jb-devChris Craik2012-05-081-1/+0
|\
| * Revert "Add temporary functor lifetime logging"Chris Craik2012-05-081-1/+0
| | | | | | | | | | bug:6445573 This reverts commit 2fe99801e81bb7c0ff846b536cbb7a12707410ed
* | Merge "Fix issue where scale-animating text would jump temporarily a few ↵Chet Haase2012-05-072-8/+5
|\ \ | | | | | | | | | pixels" into jb-dev
| * | Fix issue where scale-animating text would jump temporarily a few pixelsChet Haase2012-05-072-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some logic in the native matrix code would determine that a matrix was 'pureTranslate' based on the scale values of a matrix being close-enough to 1, which was within a very small epsilon. This works in general, because screen space coordinates make that epsilon value irrelevant, so close-enough really is close-enough. However, TextView, when centering text, works in a coordinate system that is quite huge, with left/right values about 500,000. These numbers multiplied times that small epsilon value would give a result that was significant, and would cause a miscalculation of up to 4-5 pixels, causing the snap that we'd see for a couple of frames as the scale got "close enough" to 1. The fix is to remove the optimization of "close enough". What we really need the matrix to do is to identify itself as being translate-only when no scale as been set (which is the default). For the purposes of that check, it is good enough to simply check the values against 1 directly. Similarly, the bounds-check logic needs to check against 0 and 1 directly. Issue #6452687: Glitch when changing scale of a view containing text Change-Id: I167fb45d02201fb879deea0e5a7ca95e38128e17
* | | Fix hang/crash in native path codeChet Haase2012-05-032-0/+27
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | An optimization for paths is to only create a texture for the original native Path object, and have all copies of that object use that texture. This works in most cases, but sometimes that original path object may get destroyed (when the SDK path object is finalized) while we are still referencing and using that object in the DisplayList code. This causes undefined errors such as crashes and hanging as we iterate through the operations of a destroyed (and garbage-filled) path object. The fix is to use the existing ResourceCache to refcount the original path until we are done with it. Issue #6414050 Analytics Dogfood App crashes reliably on Jellybean Change-Id: I5dbec5c069f7d6a1e68c13424f454976a7d188e9
* | Add temporary functor lifetime loggingChris Craik2012-05-021-0/+1
| | | | | | | | | | | | | | | | bug:6405861 Note: revert once the above bug is verified fixed Change-Id: Iae04ec6ffa73a2711f96e128d60011bcb5864b5c
* | Merge "Improve handling of built-in keyboard." into jb-devJeff Brown2012-05-011-3/+4
|\ \ | |/ |/|
| * Improve handling of built-in keyboard.Jeff Brown2012-05-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window manager policy made some incorrect assumptions about the meaning of the Configuration.keyboard field. We need to be more careful about distinguishing between built-in and external keyboards. Most of this change is to move the determination of the parts of the Configuration related to input devices into the WindowManagerService leveraging new features of the InputManagerService to good effect. Then we plumb through the flag that indicates whether a device is internal or external so that we can be more particular about how the lid switch effects changes to the Configuration. Bug: 6424373 Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
* | Fix launcher invisibility bugChet Haase2012-05-011-2/+2
|/ | | | | | | | | | | | | | | | | | There was a bug in the DisplayList code for layers where we would set the alpha value for a layer only if the alpha were non-1. This works most of the time (since the value is usually 1 and doesn't need to be set at all, and if the value is non-1, it is set correctly). But when the value has been set to a non-1 value, setting alpha back to 1 cannot happen due to this logic. This caused launcher to have some invisible pages when returning to Home because those pages previously had an alpha value of 0, and setting the alpha to 1 had no effect due to this DisplayList code. The fix is to simply remove the check for non-1 values; we should always set the alpha value of layers to handle all cases. Issue #6413892 alpha value is messed up after AlphaAnimation Change-Id: Ia51acb2eaaf0609ea7189998ed449bdd9ea7e05f
* Merge "Resample touch events on frame boundaries." into jb-devJeff Brown2012-04-273-51/+302
|\
| * Resample touch events on frame boundaries.Jeff Brown2012-04-273-51/+302
| | | | | | | | | | Bug: 6375101 Change-Id: I8774e366306bb2b6b4e42b913525bf25b0380ec3
* | Merge "Work-around for a Skia rasterization bug Bug #6411457" into jb-devRomain Guy2012-04-273-38/+108
|\ \
| * | Work-around for a Skia rasterization bugRomain Guy2012-04-273-38/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #6411457 Skia does not generates the bottom right pixel of a rect when drawing a rect as an SkPath into an alpha8 bitmap. Change-Id: Ifb5286ae67745c9e44ee387b6d6ad607a9a2e6ce
* | | Merge "Decode common GL error codes when logging frame error status" into jb-devRomain Guy2012-04-261-1/+10
|\ \ \ | |/ /
| * | Decode common GL error codes when logging frame error statusRomain Guy2012-04-261-1/+10
| | | | | | | | | | | | Change-Id: I38b333eea53aef20340ce48dfcb0dd30a223f7a8
* | | Merge "On new content, attach functor directly" into jb-devJohn Reck2012-04-261-4/+4
|\ \ \ | |/ / |/| |
| * | On new content, attach functor directlyChris Craik2012-04-251-4/+4
| |/ | | | | | | | | | | | | | | bug:6323847 depends on external/webkit change: https://android-git.corp.google.com/g/#/c/184314/ Change-Id: Ibdf997f3ee4f5c5c1ea5a320556813f175fea93f
* | Ensure we start every frame in the proper GL stateRomain Guy2012-04-251-0/+8
|/ | | | | | Bug #6345013, #6314960 Change-Id: I6985f7f233eb6a5f9223e9f4be3f323154b5dbf0
* Fix the build before the bot yells at me.Romain Guy2012-04-231-1/+1
| | | | Change-Id: Ice7fe02b684ad662262aae3cac7a48a835ebcad5
* Prevent WebView from crashing when detached from the windowRomain Guy2012-04-232-22/+35
| | | | | | | | | | | | | Bug #6365056 WebView enqueues a functor in the hardware renderer to handle animations and this functor is called at a later time by the hardware renderer. However, the functor was not removed from the queue when WebView was removed from the window. This could cause the hardware renderer to attempt to execute an invalid functor and lead to a crash. Change-Id: I9d38e80f3fdc5e29d4d0cdfa1e893c251a954508
* More work on international keyboards.Jeff Brown2012-04-233-8/+8
| | | | | | | | | | | | | | | | | Changed the English US keymaps to implement a strict US key map with no additional ALT functions. Fixed a bug copying the alias in the InputDevice copy constructor. Added support for end of line comments in KCM and KL files. Added the German keyboard layout. Sorted the keys in the keyboard layout files by physical arrangement to make it easier to maintain them. Bug: 6110399 Change-Id: If44d83de5b98f2bf0016cbb8e12264387b286aaa
* Remove USE_DISPLAY_LIST_PROPERTIES flagChet Haase2012-04-234-169/+148
| | | | | | | | | | | | | | | | This flag was still hanging around pending any need to disable DisplayList properties. But things seem stable, so it's time to clean up and simplify the code. At the same time, I reduced redundance in DisplayList dimensions. We used to call drawDisplayList() with width/height parameters that were used to do a clip reject. This is redundant with the DisplayList properties that set the bounds of the DisplayList; the left/right and top/bottom properties represent the same width/height properties formerly used in drawDisplayList(). The new approach is to not pass dimensions to drawDisplayList(), but to instead pull those dimensions directly from the DisplayList when needed. Change-Id: I8871beff03b1d4be95f7c6e079c31a71d31e0c56
* Get alias for Bluetooth devices.Jeff Brown2012-04-201-6/+5
| | | | | | | | | | | Bluetooth devices can be renamed by the user. Make the input system aware of the user-specified name and transparently pass it down to applications. This enables the keyboard layout picker Settings UI to use device names that are consistent with what the user set in the Bluetooth UI. Bug: 6363157 Change-Id: I8eea26ce2c69c2a3f09c8de02e9e847610e0419c
* Improve handling of certain keyboard layout properties.Jeff Brown2012-04-181-8/+62
| | | | | | | | | | | | | | | Automatically choose a default value for the 'number' property based on the characters that the key can generate. Don't generate any character when ctrl, alt or meta is pressed unless the behavior exactly matches the modifier keys that are pressed. Simplified the basic keyboard layouts taking into account the new features. Bug: 6110399 Change-Id: Ibc0f0b50c2dcf3f962a33ac77c24d2993b77637d
* Add Dvorak keyboard layout.Jeff Brown2012-04-172-10/+118
| | | | | | | | | Added support for mapping both scan codes and HID usages to KeyLayoutMap and KeyCharacterMap. Keyboard overlays can now influence how key events are mapped to key codes. Bug: 6110399 Change-Id: I6619fd2d3e1337c55928f89869dbc45b535c7ccf
* Support loading keyboard layout overlays from resources.Jeff Brown2012-04-172-24/+106
| | | | | | | | | | | | | | | | | | | | | | Added the concept of a keyboard layout overlay, which is a key character map file that has "type OVERLAY". Added support for loading keyboard layout overlays from resources dynamically. The layouts are reloaded whenever they are changed in the Settings application or an application is installed. This is somewhat more aggressive than necessary so we might want to optimize it later. Before system-ready, the input system uses just the generic keyboard layouts that are included on the device system image. After system-ready, it considers the user's selected keyboard layout overlay and attempts to load it as necessary. We need to wait until system-ready before doing this because we need to be in a state where it is safe to start applications or access their resources. Bug: 6110399 Change-Id: Iae0886d3356649b0d2440aa00910a888cedd8323
* Add support for input devices that have vibrators.Jeff Brown2012-04-131-0/+2
| | | | | | | | | | Added a getVibrator() method to InputDevice which returns a Vibrator associated with that input device. Its uses the same API as the system vibrator which makes it easy for applications to be modified to use one or the other. Bug: 6334179 Change-Id: Ifc7f13dbcb778670f3f1c07ccc562334e6109d2e
* Merge "Notify applications when input devices change."Jeff Brown2012-04-121-3/+6
|\
| * Notify applications when input devices change.Jeff Brown2012-04-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows the InputManager to keep track of what input devices are registered with the system and when they change. It needs to do this so that it can properly clear its cache of input device properties (especially the key map!) when changes occur. Added new API so that applications can register listeners for input device changes. Fixed a minor bug in EventHub where it didn't handle EPOLLHUP properly so it would spam the log about unsupposed epoll events until inotify noticed that the device was gone and removed it. Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
* | Fix layer blending bugChet Haase2012-04-123-1/+10
|/ | | | | | | | | | Cached layers were sometimes retaining an obsolete blending value, causing artifacts where translucent objects were disappearing completely. Also, added extra tracing info for DisplayLists. Issue #6303668 Flickering views during SwipeHelper drag Change-Id: I66ce158652c4a3ed316040585b40b1744e1fad0c
* HID usage should take precedence over scan code.Jeff Brown2012-04-121-6/+6
| | | | Change-Id: Ibd8988e3dcc0d64f4019ffe491d9789733f9d243
* Refactor key code mapping.Jeff Brown2012-04-111-15/+32
| | | | | | | | | | | | | | | | | | | Added handling for EV_MSC / MSC_SCAN which typically reports the HID usage associated with a key. This will enable key maps to map keys with HID usages that Linux does not natively recognize. Removed keyCode and flags fields from EventHub RawEvent since they don't necessarily make sense in isolation now that we pay attention to HID usage codes too. Removed the fallback code for mapping keys and axes. In practice, an input device should be self-sufficient. We should not ever need to look at the built-in keyboard's key map. In fact, there usually isn't a built-in keyboard anyhow. This code was originally working around a problem where we weren't loading the key map for touch screens with virtual keys, which has long since been fixed. Change-Id: I0a319bdec44be9514f795526347397e94d53a127
* Pass width/height parameters to webviewChet Haase2012-04-111-0/+4
| | | | | | | | | When webview draws into an fbo layer, it needs to know the size of that surface to create the rendering transform appropriately. This change copies in the current viewport size to the structure that is passed to the webview. Change-Id: I7160b0836d00834134c799c95a439cdc045e2035
* Request key maps from input manager service.Jeff Brown2012-04-106-184/+296
| | | | | | | | | | | | | | | | | | Instead of each application loading the KeyCharacterMap from the file system, get them from the input manager service as part of the InputDevice object. Refactored InputManager to be a proper singleton instead of having a bunch of static methods. InputManager now maintains a cache of all InputDevice objects that it has loaded. Currently we never invalidate the cache which can cause InputDevice to return stale motion ranges if the device is reconfigured. This will be fixed in a future change. Added a fake InputDevice with ID -1 to represent the virtual keyboard. Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
* You don't need LOCAL_STATIC_LIBRARIES when building static library.Ying Wang2012-04-061-4/+0
| | | | | | and there is no target static library with name libutils. Change-Id: Ifec34e1b484d749d3fcd11abe610f192a3213767
* Merge "Add a unique input device descriptor."Jeff Brown2012-04-061-3/+6
|\
| * Add a unique input device descriptor.Jeff Brown2012-04-061-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the input device descriptor is to make it possible to associate persistent settings for each input device, such as the keyboard layout. The descriptor is a hash of the information we have about the device, such as its vendor id, product id, unique id, name, or location. Bug: 6110399 Change-Id: Idb80f946819b3f0dbf4e661bb0a753dbc2b60981
* | fix functor flag parsing, tweak process delayChris Craik2012-04-051-2/+2
|/ | | | Change-Id: I0a679cc33f92ff6fd2e33db9ad58b52622def012
* Merge "Disable AA lines vertex attrib arrays after rendering"Romain Guy2012-04-042-8/+56
|\
| * Disable AA lines vertex attrib arrays after renderingRomain Guy2012-04-042-8/+56
| | | | | | | | Change-Id: I2f035e9d87f4f97bc1e37355c84570fd58df0374
* | Merge "Optimize FBOs composition"Romain Guy2012-04-031-5/+3
|\ \ | |/
| * Optimize FBOs compositionRomain Guy2012-04-031-5/+3
| | | | | | | | Change-Id: Ifc8eada8922509373c0e4c3b2ed75b6f08d098de
* | Optimization of alpha with DisplayList propertiesChet Haase2012-04-036-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | Some views (such as ImageView and TextView) handle non-opaque alpha values directly. This was originally an optimization, but we can handle it faster in many cases without this optimization when DisplayList properties are enabled. Basically, if a view has non-overlapping rendering, we set the alpha value directly on the renderer (the equivalent of setting it on the Paint object) and draw each primitive with that alpha value. Doing it this way avoids re-creating DisplayLists while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties. Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
* | Merge "Prevent crash when flushing the layers cache Bug #6258973"Romain Guy2012-04-023-2/+12
|\ \ | |/
| * Prevent crash when flushing the layers cacheRomain Guy2012-04-023-2/+12
| | | | | | | | | | | | | | | | | | | | Bug #6258973 When flushing the layer caches we would attempt to delete the FBOs associate with layers in the cache. The FBO property was however not always properly cleared when recycling layers. Change-Id: I7dedfe391d659a0849f1e1d84df17313b2c6e2b2
* | Merge "Allow fine-grained control over functors execution"Chris Craik2012-04-022-5/+45
|\ \
| * | Allow fine-grained control over functors executionRomain Guy2012-04-022-5/+45
| |/ | | | | | | | | | | Adds non-drawing execution mode Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
* | Enabling DisplayList propertiesChet Haase2012-04-021-1/+1
| | | | | | | | | | | | | | An earlier commit fixed problems with enabling DisplayList properties. This CL actually enables the properties. Change-Id: I5c41d0c64e9241822af53eb367de0fed7d9608e0
* | Re-enable DisplayList properties.Chet Haase2012-04-022-29/+68
|/ | | | | | | | | | Re-enabling DisplayList properties last week caused some app errors due to the way that some transforms were being handled (specifically, those coming from the old Animations and ViewGroup's childStaticTransformation field). This change pushes *all* transform/alpha data from View.draw() into the view's DisplayList, making DisplayLists more encapsulated (and correct). Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
* Merge "Disable DisplayList properties pending fixes for AlphaAnimation"Chet Haase2012-03-291-1/+1
|\