summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
...
* | | 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
* | Change camera interface to support multiple cameras.Chih-Chung Chang2010-06-112-0/+29
| | | | | | | | Change-Id: Ie88fe706d2278acf762eca87780de349434778a4
* | 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
* | Merge "Add KEY_SUPPORTED_METERING_MODES and fix some typos." into krakenWu-cheng Li2010-06-041-3/+4
|\ \
| * | Add KEY_SUPPORTED_METERING_MODES and fix some typos.Wu-cheng Li2010-06-041-3/+4
| | | | | | | | | | | | | | | bug:2737111 Change-Id: I108ae7057786921bf99385ad66dbc1f02d6a1448
* | | Merge "Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer ↵Eric Laurent2010-06-045-330/+2796
|\ \ \ | |/ / |/| | | | | AudioTrack modifications." into kraken
| * | 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
* | | Merge "Add camera metering mode API." into krakenWu-cheng Li2010-06-031-0/+6
|\ \ \ | |/ / |/| |
| * | Add camera metering mode API.Wu-cheng Li2010-06-031-0/+6
| | | | | | | | | | | | | | | bug:2737111 Change-Id: Ie986fee56ebeaaed2d2efb757701dfe3ffdec8d8
* | | 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
* | Merge "Add video frame parameter." into krakenWu-cheng Li2010-05-281-0/+1
|\ \
| * | Add video frame parameter.Wu-cheng Li2010-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The image format of preview frames and video frames may be different. We need another parameter for video frame format. bug:2720893 Change-Id: I966a31b0ce8cab25cdde65db65a18c8cbe9c7bd6
* | | 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
* | fix a bug when reallocating a window's buffers is neededMathias Agopian2010-05-241-2/+2
| | | | | | | | | | | | | | we need to mark the buffers that need to be reallocated, NOT the buffer's indices. Change-Id: I809e2e1b03b56c4d2ab983c25523dae99aa1da74
* | added native_window_set_buffer_count()Mathias Agopian2010-05-212-1/+11
| | | | | | | | | | | | | | this method can be used to change the number of buffers associated to a native window. the default is two. Change-Id: I608b959e6b29d77f95edb23c31dc9b099a758f2f
* | fix the threading issue for setBuffercount()Mathias Agopian2010-05-2014-172/+244
| | | | | | | | | | | | | | | | this change introduces R/W locks in the right places. on the server-side, it guarantees that setBufferCount() is synchronized with "retire" and "resize". on the client-side, it guarantees that setBufferCount() is synchronized with "dequeue", "lockbuffer" and "queue"
* | add a few tests to SharedBufferStackTestMathias Agopian2010-05-171-4/+14
| | | | | | | | Change-Id: I1c46c07aa1483aee4d4ebd8745638a2c462cc1b3
* | improve SharedBufferStack testMathias Agopian2010-05-171-15/+43
| | | | | | | | Change-Id: I32683bfe0916918757280db89113595867acd5a7
* | fix a bug where queueBuffer() would fail after the SharedbufferStack is resizedMathias Agopian2010-05-171-2/+17
| | | | | | | | Change-Id: I12bf13a62018ce1349bab7be0b0cad7fad13fee8
* | fix some bugs in SharedBufferStack::resizeMathias Agopian2010-05-171-2/+4
| | | | | | | | | | | | added buffers should now be labeled properly. Change-Id: I28aa753fbe89ab89134e7753575319478934c7fa
* | Fix issue 2553359: Pandora does not work well with Passion deskdock / Cardock.Eric Laurent2010-05-173-96/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is due to a too big difference between the buffer size used at the hardware interface and at the A2DP interface. When no resampling occurs we don't notice problems but the timing is very tight. As soon as resampling is activated, the AudioTrack underruns. This is because the AudioTrack buffers are not resized when moving the AudioTrack from hardware to A2DP output. The AudioTrack buffers are calculated based on a hardware output buffer size of 3072 bytes. Which is much less than the A2DP output buffer size (10240). The solution consists in creating new tracks with new buffers in AudioFlinger when the A2DP output is opened instead of just transfering active tracks from hardware output mixer thread to the new A2DP output mixer thread. To avoid synchronization issues between mixer threads and client processes, this is done by invalidating tracks by setting a flag in their control block and having AudioTrack release the handle on this track (IAudioTrack) and create a new IAudioTrack when this flag is detected next time obtainBuffer() or start() is executed. AudioFlinger modifications: - invalidate the tracks when setStreamOutput() is called - make sure that notifications of output opening/closing and change of stream type to output mapping are sent synchronously to client process. This is necessary so that AudioSystem has the new stream to output mapping when the AudioTrack detects the invalidate flag in the client process. Previously their were sent when the corresponding thread loop was executed. AudioTrack modifications: - move frame count calculation and verification from set() to createTrack() so that is is updated every time a new IAudioTrack is created. - detect track invalidate flag in obtainBuffer() and start() and create a new IAudioTrack. AudioTrackShared modifications - group all flags (out, flowControlFlag, forceReady...) into a single bit filed to save space. Change-Id: I9ac26b6192230627d35084e1449640caaf7d56ee
* | Fix build error.Wu-cheng Li2010-05-151-1/+1
| | | | | | | | | | | | Original name INFINITY conflicts with the macro in math.h. Change-Id: I9845ed84fca17813dd971239a902cc1e0bad1e3e
* | Add camera focus distances API.Wu-cheng Li2010-05-151-0/+2
| | | | | | | | | | | | | | | | Applications can use this API to estimate the distance between the subject and the camera. bug:1955650 Change-Id: Ie6c8ea4971759cab6c9bcdda2c5ceb5925791c27
* | Merge "fix uninitialized variable in DisplayHardware" into krakenMathias Agopian2010-05-141-1/+1
|\ \
| * | fix uninitialized variable in DisplayHardwareMathias Agopian2010-05-141-1/+1
| | | | | | | | | | | | | | | | | | this fixes the issue where the display is all messed-up sometimes. Change-Id: I20be91b5166bfff0c6d353a777351842c9df8e95
* | | Merge "Get rid of warnings when compiled with -Wformat-security" into krakenNick Kralevich2010-05-142-4/+4
|\ \ \
| * | | Get rid of warnings when compiled with -Wformat-securityNick Kralevich2010-05-132-4/+4
| | | | | | | | | | | | | | | | Change-Id: I63c3bf786bbe7a0276624e71a4ba80c4a9aaa4bb
* | | | am 900b6157: merge from open-source masterThe Android Open Source Project2010-05-141-4/+4
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | Merge commit '900b6157f5dee2ed7b2c73cf320b2baf293230ff' into kraken * commit '900b6157f5dee2ed7b2c73cf320b2baf293230ff': Only hold a weak pointer on SurfaceComposerClients
| * | | merge from open-source masterThe Android Open Source Project2010-05-141-4/+4
| |\ \ \ | | |_|/ | |/| | | | | | Change-Id: I0249c6d796b35af9ba08cbccd463a1f5cf779ecd