summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Add new native Looper API.Dianne Hackborn2010-07-021-4/+64
| | | | | | | | | | | This allows us to avoid exposing the file descriptor of the event queue; instead, you attach an event queue to a looper. This will also should allow native apps to be written without the need for a separate thread, by attaching the event queue to the main thread's looper and scheduling their own messages there. Change-Id: I38489282635895ae2cbfacb88599c1b1cad9b239
* remove unused YUV formatsMathias Agopian2010-07-012-18/+24
| | | | Change-Id: Ie84616f842c7e0329d68e67e65a65d510558004b
* Merge "Introduce official public NativeWindow type." into gingerbreadDianne Hackborn2010-06-302-36/+36
|\
| * Introduce official public NativeWindow type.Dianne Hackborn2010-06-302-36/+36
| | | | | | | | | | | | | | Not yet hooked up to anything in the NDK, but requires renaming the existing android_native_window_t type everywhere. Change-Id: Iffee6ea39c93b8b34e20fb69e4d2c7c837e5ea2e
* | Merge "fix live wallpapers on Droid" into gingerbreadMathias Agopian2010-06-303-12/+13
|\ \
| * | fix live wallpapers on DroidMathias Agopian2010-06-303-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | On omap3 h/w we force opaque formats to RGB_565 instead of RGBX_8888 because the GL driver doesn't support it. RGBX_8888 is always remapped to RGBA_8888. Change-Id: I0bfabeb98c8d3a399079e6797cf2a0ee95915324
* | | Fix injection of specially intercepted keys like HOME.Jeff Brown2010-06-301-4/+0
| |/ |/| | | | | | | | | | | | | This change mainly unwinds a premature optimization in the dispatch pipeline. To test HOME injection, run 'adb shell input keyevent 3'. Change-Id: I1c4b7377c205da7c898014b8b07fc6dc1d46e4dd
* | Implement default key handling for native code.Dianne Hackborn2010-06-301-0/+64
| | | | | | | | | | | | | | | | | | The native code now maintains a list of all keys that may use default handling. If the app finishes one of these keys without handling it, the key will be passed back off to Java for default treatment. Change-Id: I6a842a0d728eeafa4de7142fae573f8c11099e18
* | Merge "Fix native input dispatch in the emulator." into gingerbreadChris Tate2010-06-292-28/+87
|\ \
| * | Fix native input dispatch in the emulator.Jeff Brown2010-06-292-28/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set a default orientation of ROTATION_0. Added some more careful checks based on whether we have valid absolute axis information from the driver. Reset key repeating during configuration changes since the keyboard device may have been removed. Change-Id: I685960828acffcb17595fc5683309e8064a76714
* | | Merge "remove a hack that was used only used on h/w we no longer support." ↵Mathias Agopian2010-06-292-72/+1
|\ \ \ | |/ / |/| / | |/ into gingerbread
| * remove a hack that was used only used on h/w we no longer support.Mathias Agopian2010-06-292-72/+1
| | | | | | | | | | | | this should fix the opal build. Change-Id: I43d7633696fea5be6bc834293a832d22f6bdfc61
* | Update native activity & event APIs to follow correct conventions.Dianne Hackborn2010-06-291-4/+4
|/ | | | Change-Id: Ie64fb3a9c68bc9c117fa5621b75d1f609e304e0e
* Merge changes I93dfc4c8,I781953d6 into gingerbreadMathias Agopian2010-06-2814-134/+367
|\ | | | | | | | | | | * changes: fix[2798925] Gingerbread TOT not booting Revert "Revert "fix [2793164] Spam 2x/second with TOT master in SurfaceFlinger""
| * fix[2798925] Gingerbread TOT not bootingMathias Agopian2010-06-281-6/+3
| | | | | | | | | | | | | | Fixed a typo where checking against the wrong constant caused GL_TEXTURE_EXTERNAL_OES to be used with a regular texture, which some GL driver will choke on. Change-Id: I93dfc4c8fa674433bbb678eee31954e9a8d0cb4b
| * Revert "Revert "fix [2793164] Spam 2x/second with TOT master in SurfaceFlinger""Mathias Agopian2010-06-2514-134/+370
| | | | | | | | This reverts commit 330dd304a471d260a73e342a240921c03c825f99.
* | Native input event dispatching.Jeff Brown2010-06-284-41/+108
|/ | | | | | | | | Target identification is now fully native. Fixed a couple of minor issues related to input injection. Native input enabled by default, can be disabled by setting WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false. Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
* Various fixes and improvements in audio effects implementationEric Laurent2010-06-252-164/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Effect API: - Use different definitions for audio device, channels, formats... in AudioSystem and EffectApi: Removed media/AudioCommon.h file created for initial version of EffectApi - Indicate audio session and output ID to effect library when calling EffectCreate(). Session ID can be useful to optimize the implementation of effect chains in the same audio session. Output ID can be used for effects implemented in audio hardware. - Renamed EffectQueryNext() function to EffectQueryEffect() and changed operating mode: now an index is passed for the queried effect instead of implicitly querying the next one. - Added CPU load and memory usage indication in effects descriptor - Added flags and commands to indicate changes in audio mode (ring tone, in call...) to effect engine - Added flag to indicate hardware accelerated effect implementation. - Renamed EffectFactoryApi.h to EffectsFactoryApi.h for consistency with EffectsFactory.c/h Effect libraries: - Reflected changes in Effect API - Several fixes in reverb implementation - Added build option TEST_EFFECT_LIBRARIES in makefile to prepare integration of actual effect library. - Replaced pointer by integer identifier for library handle returned by effects factory Audio effect framework: - Added support for audio session -1 in preparation of output stage effects configuration. - Reflected changes in Effect API - Removed volume ramp up/down when effect is inserted/removed: this has to be taken care of by effect engines. - Added some overflow verification on indexes used for deferred parameter updates via shared memory - Added hardcoded CPU and memory limit check when creating a new effect instance Change-Id: I43fee5182ee201384ea3479af6d0acb95092901d
* Remember to initialize timestamps in the dispatch allocatorChristopher Tate2010-06-231-0/+1
| | | | Change-Id: I83a2d353c34ff84a7d130e602c6dedc6a5541944
* First stab at attaching native event dispatching.Dianne Hackborn2010-06-222-163/+19
| | | | | | | | | | | | Provides the basic infrastructure for a NativeActivity's native code to get an object representing its event stream that can be used to read input events. Still work to do, probably some API changes, and reasonable default key handling (so that for example back will still work). Change-Id: I6db891bc35dc9683181d7708eaed552b955a077e
* remove unused YUV formatsMathias Agopian2010-06-212-16/+0
| | | | Change-Id: Id0ae28b1700cf771cdbe0ca27b139d32cab90b2a
* Merge "Start of work on passing around StrictMode policy over Binder calls." ↵Brad Fitzpatrick2010-06-213-7/+21
|\ | | | | | | into gingerbread
| * Start of work on passing around StrictMode policy over Binder calls.Brad Fitzpatrick2010-06-213-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | This is (intendend to be) a no-op change. At this stage, Binder RPCs just have an additional uint32 passed around in the header, right before the interface name. But nothing is actually done with them yet. That value should right now always be 0. This now boots and seems to work. Change-Id: I135b7c84f07575e6b9717fef2424d301a450df7b
* | fix [2785833] valgrind error in android::Layer::requestBufferMathias Agopian2010-06-211-0/+1
| | | | | | | | | | | | fix uninitialized variable Change-Id: I99e1b619ae8c88dd9d77b3abf4762f801019047e
* | Merge "Added support for the GL_TEXTURE_EXTERNAL target" into gingerbreadMathias Agopian2010-06-219-107/+196
|\ \
| * | Added support for the GL_TEXTURE_EXTERNAL targetMathias Agopian2010-06-159-107/+196
| | | | | | | | | | | | | | | | | | This will allow us to support YUV surfaces. Change-Id: I2d4da75f1006a5285bdc552695d4caeecccf2183
* | | 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-1712-107/+821
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-142-8/+18
|/ | | | | | | The build system enforces some invariants that were being ignored before. Change-Id: Ie7675042af7f961a507386c13b2a0b592b591af8
* Remove PollLoop from host build.Jeff Brown2010-06-131-4/+4
| | | | | | We can't build (and we don't need) PollLoop in the SDK on all platforms. Change-Id: I3b0f327bbb8bc58b9b8630b0161cf360403fea68
* Fix include paths.Jeff Brown2010-06-132-3/+0
| | | | Change-Id: Ifda45688f9f02710a74d5d7a7d902bacf1441e2e
* Native input dispatch rewrite work in progress.Jeff Brown2010-06-1319-92/+5153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix String8 to free its memory only after assignment operations based on ↵Andreas Huber2010-06-101-4/+8
| | | | | | pointers are finished in case that pointer referred to the string's original contents. Change-Id: I6961f3cf10ba3b728579ea63262db750a4cf8577
* allow re-targetting of surfacesMathias Agopian2010-06-086-37/+103
| | | | | | | | | 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
* fix [2751143] Device crashes when in a text box for too longMathias Agopian2010-06-082-4/+3
|
* optimize Surface.readFromParcel()Mathias Agopian2010-06-041-8/+13
| | | | | | | | | | | | this is called for each relayout() and used to create a full Surface (cpp) which in turn did some heavy work (including an IPC with surfaceflinger), most of the time to destroy it immediatelly when the returned surface (the one in the parcel) was the same. we now more intelligentely read from the parcel and construct the new object only if needed. Change-Id: Idfd40d9ac96ffc6d4ae5fd99bcc0773e131e2267
* split surface management from surface's buffers managementMathias Agopian2010-06-0412-351/+592
| | | | Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
* clean-up client management.Mathias Agopian2010-06-0415-607/+253
| | | | | | | simplified things a lot, the biggest change is that the concept of "ClientID" is now gone, instead we simply use references. Change-Id: Icbc57f80865884aa5f35ad0d0a0db26f19f9f7ce
* Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack ↵Eric Laurent2010-06-035-330/+2796
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modifications. First drop of audio framework modifications for audio effects support. - AudioTrack/AudioRecord: Added support for auxiliary effects in AudioTrack Added support for audio sessions Fixed left right channel inversion in setVolume() - IAudioFlinger: Added interface methods for effect enumeraiton and instantiation Added support for audio sessions. - IAudioTrack: Added method to attach auxiliary effect. - AudioFlinger Created new classes to control effect engines in effect library and manage effect connections to tracks or output mix: EffectModule: wrapper object controlling the effect engine implementation in the effect library. There is one EffectModule per instance of an effect in a given audio session EffectChain: group of effects associated to one audio session. There is one EffectChain per audio session. EffectChain for session 0 is for output mix effects, other chains are attached to audio tracks with same session ID. Each chain contains a variable number of EffectModules EffectHandle: implements the IEffect interface. There is one EffectHandle object for each application controlling (or using) an effect module. THe EffectModule maintians a list of EffectHandles. Added support for effect modules and effect chains creation in PlaybackThread. modified mixer thread loop to allow track volume control by effect modules and call effect processing. -AudioMixer Each track now specifies its output buffer used by mixer for accumulation Modified mixer process functions to process tracks by groups of tracks with same buffer Modified track process functions to support accumulation to auxiliary channel Change-Id: I26d5f7c9e070a89bdd383e1a659f8b7ca150379c
* fix a bug where fading in/out of opaque 32-bits windows wasn't workingMathias Agopian2010-06-012-22/+19
| | | | | | | | | | | 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.
* more clean-up in preparation of bigger changesMathias Agopian2010-05-289-70/+84
| | | | | | | the most important change here is the renaming of ISurfaceFlingerClient to ISurfaceComposerClient Change-Id: I94e18b0417f50e06f21377446639c61f65f959b3
* more clean-up of Surfaceflinger's client managementMathias Agopian2010-05-272-238/+170
| | | | | | | | | | | | SurfaceComposerClient now only exist on the WindowManager side, the client side uses the new SurfaceClient class, which only exposes what a client needs. also instead of keeping mappings from IBinder to SurfaceComposerClients we have a SurfaceClient per Surface (referring to the same IBinder), this is made possible by the fact that SurfaceClient is very light. Change-Id: I6a1f7015424f07871632a25ed6a502c55abfcfa6
* minor clean-up GLclampx -> GLclampfMathias Agopian2010-05-263-9/+9
|
* clean-up dead-codeMathias Agopian2010-05-264-27/+0
|
* Make sure to use filtering while in fixed-size modeMathias Agopian2010-05-265-8/+26
|
* oopsie. forgot to displatch SET_BUFFERS_GEOMETRYMathias Agopian2010-05-261-0/+3
|
* fix [2712278] The preview buffer left some black borders in left and bottom ↵Mathias Agopian2010-05-254-101/+101
| | | | | | | | edges we were incorrectly flagging push_buffer surfaces as invalid Change-Id: I4dfd4ffbbe8a71f7e23e835db8d71966416c29bb
* added the notion of fixed-size buffersMathias Agopian2010-05-247-86/+216
| | | | | | | | | the new native_window_set_buffers_geometry allows to specify a size and format for all buffers to be dequeued. the buffer will be scalled to the window's size. Change-Id: I2c378b85c88d29cdd827a5f319d5c704d79ba381