summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | * | Only hold a weak pointer on SurfaceComposerClientsMatt Fischer2010-04-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each process maintains an array of active SurfaceComposerClient objects, so that they can be reused as new surfaces are parceled across. When a SurfaceComposerClient is disposed, it will remove itself from this list. However, because the list maintains a strong reference on the object, a reference cycle is created, and the client is never deleted. This patch changes the list to maintain weak pointers on the clients instead. Change-Id: I93dc8155fe28b4e350366a3400cdf22a8c77cdd3
| | * | DO NOT MERGE. Merge Froyo renderscript to Eclair to support live wallpapers ↵Jason Sams2010-02-1168-1979/+2424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on droid. This gives the necessary CPU reduction to allow the wallpapers to work on the slower CPU. Committer: Jason Sams <rjsams@android.com> On branch droid Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: libs/rs/rsAllocation.cpp modified: libs/rs/rsAllocation.h modified: libs/rs/rsContext.cpp modified: libs/rs/rsContext.h modified: libs/rs/rsProgram.cpp modified: libs/rs/rsProgram.h Delete the old rollo sample which is obsolete. Fix film init Begin gl2 support. Renderscript still uses GL1.1 by default. However, 2.0 can be enabled and will render most tests correctly. Fix film Beging GL2 user shaders. Switch master to using GL2 by default. Implement RS tracked defered texture and buffer object uploads. Committer: Jason Sams <rjsams@android.com> On branch droid Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: libs/rs/rsAllocation.cpp modified: libs/rs/rsAllocation.h modified: libs/rs/rsContext.h modified: libs/rs/rsProgramFragment.cpp modified: libs/rs/rsSimpleMesh.cpp Remove check for surface valid that is no longer valid. Continue development of es2.0 user shader support for renderscript. This change cleans up ProgramVertex creation and adds support for passing input, output, and constant type info. Continue es2 shader dev Conflicts: graphics/java/android/renderscript/Program.java graphics/java/android/renderscript/ProgramVertex.java Place shader logging behind prop to declutter logs. Fix emulated glColor in es2 mode. Fix live wallpaper many. Z coordinate was being ignored for draw quad call. Add argument checking to sampler builder to disallow illegal modes. Move texture bindings to base program object. Change ProgramFragment creation to require a texture format in 1.0 mode. Element restructuring. Add support for new basic Element types including the RS objects and vectors(2-4). In theory this paves the way for maintaining type info for RS objects, passing elements for GLSL uiforms/attribs/varyings, and supporting nested structures. This will break some apps, checkings for other projects will follow to unbreak them. Disable excessive RS logging. Add RS support for generic attribs as input to vertex programs. More complete support for named attribs. Adds user typed attribs as available to programVertex. Non user attribs are not treated like user for GL2 for simplicity. Support npot on es 2.0 HW. Change user attribs to look for empty slot rather than using them in order. Prevents conflict with numbered legacy slots. Fix npot but where mipmap level sizes were rounding in the wrong direction. Should always be floor. Implement type generation for user uniforms in vertex shader. Remove excessive logging, fix error in GLSL uniform generation. Fix RS mipmap generation for 8 bit alpha textures. Cleanup seperation of Legacy and user attribs. All user programs now use the new names. Legacy vertex attribs are given default names. Fix some minor bugs with GL state setup that were exposed by Droids driver. Implement drawSpriteCropped on es2.0
* | | | Merge "Fix deadlock if the last reference of ICameraClient is removed in ↵Chih-Chung Chang2010-05-141-1/+6
|\ \ \ \ | | | | | | | | | | | | | | | ICamera::connect()" into kraken
| * | | | Fix deadlock if the last reference of ICameraClient is removed inChih-Chung Chang2010-05-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICamera::connect() Change-Id: I34ab3e4f07435c62168175e9bb159022c8fb99f4
* | | | | AudioFlinger: rename variables to clarify reference to track channel count ↵Eric Laurent2010-05-142-33/+35
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or channel mask Some variables and structure members should be renamed to reflect the fact that they contain the number of channels in a track (channel count) or the actual channels used by a track (channel mask). Especially member "channels" of track control block (struct audio_track_cblk_t) is actually the number of channels (channels count). Change-Id: I220c8dede9fc00c8a5693389e790073b6ed307b8
* | | | Merge "Fix issue 2678048: binder death detection in AudioFlinger is broken." ↵Eric Laurent2010-05-122-35/+89
|\ \ \ \ | | | | | | | | | | | | | | | into kraken
| * | | | Fix issue 2678048: binder death detection in AudioFlinger is broken.Eric Laurent2010-05-122-35/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug in the way notification client list is managed when the client binder interface dies that makes that the dead client is not removed from the list: the week reference passed by binderDied() cannot be promoted and compared to the strong references in the list. The fix consists in creating a new NotificationClient class that implements the binder DeathRecipient and holds a strong reference to the IAudioFlingerClient interface. A new instance of this class is created for each cient and a strong reference to this object is added to the notification client list maintained by AudioFlinger. When binderDied() is called on this object, it is removed from the list preventing AudioFlinger to notify this client for further io changes. Also added code to disable LifeVibes effects when the client that has enabled the enhancements dies. Change-Id: Icedc4af171759e9ae9a575d82d44784b4e8267e8
* | | | | Merge "Several fixes in AudioDumpInterface:" into krakenEric Laurent2010-05-122-93/+139
|\ \ \ \ \
| * | | | | Several fixes in AudioDumpInterface:Eric Laurent2010-05-122-93/+139
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - forward setMode() and getInputBufferSize() calls to underlying audio hardware interface. - Allow capture of more than one output stream (previous implementation was only capturing the first output opened, namely the hardware output). - Allow capture of input streams: previous implementation was only simulating input streams when more than one was open at a time by reading from a file on SD card). Now the default behavior is to capture PCM data read from input stream if it was successfully opened or simulate capture otherwise. Change-Id: I7e2892b25e295fc3c19c7eb0f71bfaea5816b73a
* | | | | Merge "SharedBufferStack now can grow up to 16 buffers." into krakenMathias Agopian2010-05-127-6/+166
|\ \ \ \ \
| * | | | | SharedBufferStack now can grow up to 16 buffers.Mathias Agopian2010-05-127-6/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is a new resize() api, which currently only allows growing. Change-Id: Ia37b81b73be466d2491ffed7f3a23cd8e113c6fe
* | | | | | Merge "Refactor some code in surfaceflinger in preparation of upcoming ↵Mathias Agopian2010-05-1210-366/+555
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | changes" into kraken
| * | | | | Refactor some code in surfaceflinger in preparation of upcoming changesMathias Agopian2010-05-1210-366/+555
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the new TextureMagager class now handle texture creation and upload as well as EGL image creation and binding to GraphicBuffers. This is used indirectly by Layer and directly by LayerBuffer the new BufferManager class handles the set of buffers used for a Layer (Surface), it abstracts how many buffer there is as well as the use of EGLimage vs. regular texture ops (glTexImage2D). Change-Id: I2da1ddcf27758e6731400f6cc4e20bef35c0a39a
* | | | | | Merge "remove the "memcpy" hack" into krakenMathias Agopian2010-05-124-110/+7
|\ \ \ \ \ \ | |/ / / / / | | | | | / | |_|_|_|/ |/| | | |
| * | | | remove the "memcpy" hackMathias Agopian2010-05-124-110/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this hack was used for gpus that don't support cached buffers for s/w clients. currently we have no gpu with this issue. this removes quite a bit of complexity. Change-Id: I72564669f124f92805030e61983711f61c76b6d9
* | | | | Merge "ZipUtilsRO rewrite based on Dalvik Zip rewrite" into krakenKenny Root2010-05-123-169/+299
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | ZipUtilsRO rewrite based on Dalvik Zip rewriteKenny Root2010-05-123-169/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the way zip archives are handled. This is necessary to deal with very large (~1GB) APK files, for which our current approach of mapping the entire file falls over. We now do the classic scavenger hunt for the End Of Central Directory magic on a buffer of data read from the file, instead of a memory-mapped section. We use what we find to create a map that covers the Central Directory only. If the caller is interested in unpacking the file contents, we have to do an additional file read to discover the size of the Local File Header section so we can skip past it. This is based on Change I745fb15abb in the dalvik tree. Both implementations share a common ancestry, but the cost of unifying them outweighs the benefits of wrapping C calls. Change-Id: Iddacb50fe913917c2845708a530872d65fdbe620
* | | | | am d8c33747: am 78624e41: Add remove method in CameraParameters class.Wu-cheng Li2010-05-121-0/+5
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| | | | | | | | | | Merge commit 'd8c33747afbe98e893e0569f3bf45b67a9e8e728' into kraken * commit 'd8c33747afbe98e893e0569f3bf45b67a9e8e728': Add remove method in CameraParameters class.
| * | | Add remove method in CameraParameters class.Wu-cheng Li2010-05-111-0/+5
| | | | | | | | | | | | | | | | | | | | bug:2672651 Change-Id: I537c817b5ca6a3d925f22febe9a5769156354d00
* | | | Merge "Add continuous focus mode constant." into krakenWu-cheng Li2010-05-101-0/+1
|\ \ \ \
| * | | | Add continuous focus mode constant.Wu-cheng Li2010-05-101-0/+1
| | |/ / | |/| | | | | | | | | | | | | | bug:2612447 Change-Id: I9bc3f5a47ad50722a265d50b1d28fb82a2253dc9
* | | | am 56aed6bd: am c69775d6: Merge "fix [2664345] Flash: Bad flicker at the end ↵Mathias Agopian2010-05-101-3/+22
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | | | | | | | of a pinch zoom." into froyo Merge commit '56aed6bde0c52658d2cb1207c0cfe8ba0a764c59' into kraken * commit '56aed6bde0c52658d2cb1207c0cfe8ba0a764c59': fix [2664345] Flash: Bad flicker at the end of a pinch zoom.
| * | fix [2664345] Flash: Bad flicker at the end of a pinch zoom.Mathias Agopian2010-05-061-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the window manger puts SurfaceViews up before they have been rendered into, because of that surfaceflinger doesn't have anything ready to draw for that surface when an udpate occurs and responds by filling the surface with black. With this fix, we only fill those areas of the framebuffer that would otherwise be undefined (no content at all). in the Flash case, the "flash" window is not drawn at all until it has some content, instead the underlaying browser window is shown. Change-Id: Ifb610f7f8c27b88edf83e09adc4803fc295c15a1