summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* 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 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
* | am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and ↵Dan Egnor2010-05-064-30/+43
|\ \ | |/ | | | | | | | | | | | | | | libbinder." into froyo Merge commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f' into kraken * commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f': Make static versions of libutils and libbinder.
| * Make static versions of libutils and libbinder.Dan Egnor2010-05-064-30/+43
| | | | | | | | | | | | | | | | | | | | Fix some small static-initialization-order issues (and a static- initializers-missing issue) that result from doing so. The static libraries don't actually get used for anything real at the moment -- they're used for perf tests of bug 2660235. Bug: 2660235 Change-Id: Iee2f38f79cc93b395e8d0a5a144ed92461f5ada0
| * DO NOT MERGE fix [2557396] Adreno200: glDrawTexi() doesn't work with height ↵Mathias Agopian2010-04-201-54/+39
| | | | | | | | | | | | | | | | <= 16 don't use glDrawTexi() anymore Change-Id: If71334de39114b0edce7771366f8d8dc26f6911e
* | make sure the server-side validates pointers/indices visible on the client sideMathias Agopian2010-04-301-1/+15
| | | | | | | | Change-Id: I604f58d3fcd2d09ec7998123c627401081345cd6
* | Merge "Add support for enqueuing buffers in arbitrary order" into krakenMathias Agopian2010-04-304-21/+290
|\ \
| * | Add support for enqueuing buffers in arbitrary orderMathias Agopian2010-04-284-21/+290
| | | | | | | | | | | | | | | | | | Also added a very simple SharedBufferStack unit test. Change-Id: I253dbbe98a53c966b78d22d4d6dd59f8aefc8c40
* | | Merge "cleanup. waitForCondition() now uses polymorphsim instead of ↵Mathias Agopian2010-04-292-21/+51
|\ \ \ | |/ / | | | | | | templtes" into kraken
| * | cleanup. waitForCondition() now uses polymorphsim instead of templtesMathias Agopian2010-04-282-21/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | the reason for the above change is that waitForCondition() had become large over time, mainly to handle error cases, using inlines to evaluate the condition doesn't buys us much anymore while it increases code size. Change-Id: I2595d850832628954b900ab8bb1796c863447bc7
* | | Merge "fix a race condition in undoDequeue(), where 'tail' could be computed ↵Mathias Agopian2010-04-291-24/+11
|\ \ \ | |/ / | | | | | | incorrectly." into kraken
| * | fix a race condition in undoDequeue(), where 'tail' could be computed ↵Mathias Agopian2010-04-281-24/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incorrectly. in the undoDequeue() case, 'tail' was recalculated from 'available' and 'head' however there was a race between this and retireAndLock(), which could cause 'tail' to be recalculated wrongly. the interesting thing though is that retireAndLock() shouldn't have any impact on the value of 'tail', which is client-side only attribute. we fix the race by saving the value of 'tail' before dequeue() and restore it in the case of undoDequeue(), since we know it doesn't depend on retireAndLock(). Change-Id: I4bcc4d16b6bc4dd93717ee739c603040b18295a0
* | | New xlarge screen size.Dianne Hackborn2010-04-281-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Not complete, only for experimentation at this point. This includes a reworking of how screen size configurations are matched, so that if you are on a larger screen we can select configurations for smaller screens if there aren't any exactly matching the current screen. The screen size at which we switch to xlarge has been arbitrarily chosen; the compatibility behavior has not yet been defined. Change-Id: I1a33b3818eeb51a68fb72397568c39ab040a07f5
* | more surfaceflinger cleanupsMathias Agopian2010-04-2112-171/+112
| | | | | | | | | | | | | | get rid of the "fake rtti" code, and use polymorphism instead. also simplify how we log SF's state (using polymorphism) Change-Id: I2bae7c98de4dd207a3e2b00083fa3fde7c467922
* | better fix for [2420565] Surface.lockCanvas() updates the dirty region too oftenMathias Agopian2010-04-214-37/+43
| | | | | | | | Change-Id: I83438b40effd21538f1c74396dc665254b9d5ab6
* | Merge "added setCrop() to android_native_window_t" into krakenMathias Agopian2010-04-202-16/+59
|\ \
| * | added setCrop() to android_native_window_tMathias Agopian2010-04-202-16/+59
| | | | | | | | | | | | | | | | | | | | | hooked up the new method up to Surface.cpp the actual crop is not implemented in SF yet Change-Id: Ic6e313c98fd880f127a051a0ccc71808bd689751
* | | Merge "add support for up to 16 buffers per surface" into krakenMathias Agopian2010-04-201-8/+34
|\ \ \ | |/ /
| * | add support for up to 16 buffers per surfaceMathias Agopian2010-04-201-8/+34
| | | | | | | | | | | | | | | | | | | | | also increase the dirtyregion size from 1 to 6 rectangles. Overall we now need 27KiB process instead of 4KiB Change-Id: Iebda5565015158f49d9ca8dbcf55e6ad04855be3
* | | Merge "clean-up surfaceflinger a bit" into krakenMathias Agopian2010-04-208-106/+63
|\ \ \
| * | | clean-up surfaceflinger a bitMathias Agopian2010-04-208-106/+63
| |/ / | | | | | | | | | | | | | | | get rid of the glDrawTexi path and use floating points instead of fixed point maths Change-Id: I3aa9ce2dc082f702160e605a16ba5fe987cdf087
* | | am 0fabf2e8: am 8ccbd4ba: Merge "Fix bug 2604132 40s skip after undocking In ↵Jean-Michel Trivi2010-04-201-1/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | case of A2DP write errors, there is an overflow in the calculation of the sleep duration to simulate the timing of a successful write." into froyo Merge commit '0fabf2e81559106cb4aaf9e8ba45b0bed37d5eb8' into kraken * commit '0fabf2e81559106cb4aaf9e8ba45b0bed37d5eb8': Fix bug 2604132 40s skip after undocking
| * Fix bug 2604132 40s skip after undockingJean-Michel Trivi2010-04-201-1/+1
| | | | | | | | | | | | | | In case of A2DP write errors, there is an overflow in the calculation of the sleep duration to simulate the timing of a successful write. Change-Id: Ic4e570aebf07fac69735aab1bbc2fc73512ee795
* | am 26f61635: am 0a4ab1b9: Merge "fix [2599939] "cannot play video" after ↵Mathias Agopian2010-04-191-23/+0
|\ \ | |/ | | | | | | | | | | | | | | open/close a video player a dozen of times" into froyo Merge commit '26f6163557980062dbb203388b3d0794ee0d06f7' into kraken * commit '26f6163557980062dbb203388b3d0794ee0d06f7': fix [2599939] "cannot play video" after open/close a video player a dozen of times
| * fix [2599939] "cannot play video" after open/close a video player a dozen of ↵Mathias Agopian2010-04-191-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | times get rid off the MAP_ONCE flag is MemoryHeapBase (as well as it's functionality), this feature should not be used anymore. the software renderer was incorrectly using the default ctor which set MAP_ONCE, causing the leak. the software renderer itself is incorrectly used while coming back from sleep. Change-Id: I123621f8d140550b864f352bbcd8a5729db12b57
* | when a zero dimension buffer is allocated, turn the allocation intoMathias Agopian2010-04-151-10/+9
| | | | | | | | | | | | a 1x1 buffer instead of Nx1 (or 1xN) Change-Id: I27eeb15e83e13002dd9405f4e52b54f7dffc0fe7
* | am e7d5a2f9: am 45423465: Merge "fix [2594950] Flash: Zooming in on some ↵Mathias Agopian2010-04-143-2/+27
|\ \ | |/ | | | | | | | | | | | | | | content crashes the Nexus One and causes it to reboot (runtime restart)" into froyo Merge commit 'e7d5a2f9ae47d8ea8face3f1e451314ed36f4026' into kraken * commit 'e7d5a2f9ae47d8ea8face3f1e451314ed36f4026': fix [2594950] Flash: Zooming in on some content crashes the Nexus One and causes it to reboot (runtime restart)
| * fix [2594950] Flash: Zooming in on some content crashes the Nexus One and ↵Mathias Agopian2010-04-143-2/+27
| | | | | | | | | | | | | | | | | | | | causes it to reboot (runtime restart) We now limit the size of the surface to the maximum size supported by the GPU. On Nexus One this will 2048 -- it could be different on other devices. Surface creation fails if the limit is exceeded. Change-Id: I9ecfc2e9c58c9e283782b61ebfc6b590f71df785
* | am 1921527c: am 9da7730d: Merge "Additional fix for isssue 2548710: Native ↵Eric Laurent2010-04-091-1/+1
|\ \ | |/ | | | | | | | | | | | | | | AudioTrack resources never freed." into froyo Merge commit '1921527c8dbcb9f10683e43bca12648cb2c6e5b7' into kraken * commit '1921527c8dbcb9f10683e43bca12648cb2c6e5b7': Additional fix for isssue 2548710: Native AudioTrack resources never freed.
| * Additional fix for isssue 2548710: Native AudioTrack resources never freed.Eric Laurent2010-04-091-1/+1
| | | | | | | | | | | | | | This changes fixes the issue for the direct output thread that was not addressed by commit 71f37cd8a175ee00635cb91506d6810fd02b5b51. Change-Id: I1bbe26be5f444415dd97270e49257650f5d2858f
* | fix [2420565] Surface.lockCanvas() updates the dirty region too oftenMathias Agopian2010-04-081-11/+14
| | | | | | | | | | | | There was a bug where we were we could be reallocating buffers for no reason. Change-Id: Ieb8a81a289da9339ab7faf987cd3a73428943c1a
* | Make pixels prettier.Mathias Agopian2010-04-051-1/+1
|/ | | | Change-Id: If3b0774b70cbe943894c15ffa1da111ad887010f
* Fix isssue 2548710: Native AudioTrack resources never freed.Eric Laurent2010-03-311-1/+1
| | | | | | | | | | The problem is a bug in AudioFlinger::MixerThread::prepareTracks_l() that makes that even if the TrackHandle is destroyed, the corresponding Track will remain active as long as frames are ready for mixing. If the track uses shared memory (static mode) and the sound is looped, this track will play for ever. The fix consists in removing the track from active list immediately if the track is terminated. Change-Id: I4582aa1d981079ab79be442fb6185f5afaed5cf3
* Revert "fix [2542425] memory leak during video recording"Dianne Hackborn2010-03-301-2/+0
| | | | This reverts commit 544592e14f8d7643238e40ba9879727497900f35.
* fix [2542425] memory leak during video recordingMathias Agopian2010-03-301-0/+2
| | | | | | | [Sorted|Keyed]Vector<TYPE> would leak their whole storage when resized from the end and TYPE had trivial dtor and copy operators. Change-Id: I8555bb1aa0863df72de27d67ae50e20706e90cf5
* fix [2542425] memory leak during video recordingMathias Agopian2010-03-291-1/+4
| | | | | | | | Vector::sort() is using _do_copy() incorrectly; _do_copy() calls the copy constructor, not the assignment operator, so we need to destroy the "destination" before copying the item. Change-Id: Iaeeac808fa5341a7d219edeba4aa63d44f31473c
* fix [2545826] calling into gralloc with external lock heldMathias Agopian2010-03-251-4/+0
| | | | Change-Id: I2d0e017382404c684c768a0dd0423d574213f10a
* Merge "libutils Condition are now PRIVATE by default"Mathias Agopian2010-03-191-1/+1
|\