summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* More work in progress on native events.Jeff Brown2010-06-155-278/+408
| | | | | | | | 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
* Fix include paths.Jeff Brown2010-06-131-1/+1
| | | | Change-Id: Ifda45688f9f02710a74d5d7a7d902bacf1441e2e
* Native input dispatch rewrite work in progress.Jeff Brown2010-06-1314-152/+2263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* allow re-targetting of surfacesMathias Agopian2010-06-082-13/+9
| | | | | | | | | 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
* optimize Surface.readFromParcel()Mathias Agopian2010-06-041-4/+3
| | | | | | | | | | | | 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-046-33/+37
| | | | Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
* more clean-up in preparation of bigger changesMathias Agopian2010-05-286-19/+32
| | | | | | | the most important change here is the renaming of ISurfaceFlingerClient to ISurfaceComposerClient Change-Id: I94e18b0417f50e06f21377446639c61f65f959b3
* Fix a typo in Singleton<>Mathias Agopian2010-05-281-3/+5
| | | | | it could cause the sLock field to be emitted several times in different compilation unit. it also prevented to have 2 Singleton<> in the same file.
* more clean-up of Surfaceflinger's client managementMathias Agopian2010-05-272-19/+27
| | | | | | | | | | | | 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
* fix [2712278] The preview buffer left some black borders in left and bottom ↵Mathias Agopian2010-05-253-15/+12
| | | | | | | | edges we were incorrectly flagging push_buffer surfaces as invalid Change-Id: I4dfd4ffbbe8a71f7e23e835db8d71966416c29bb
* added the notion of fixed-size buffersMathias Agopian2010-05-244-7/+57
| | | | | | | | | 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-0/+1
| | | | | | | 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-213-8/+24
| | | | | | | 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-201-14/+29
| | | | | | | | 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"
* added RWLock C++ wrapperMathias Agopian2010-05-191-0/+90
| | | | Change-Id: Ia736bf7f6e2c49915a9ab5669551cf89dafa7961
* fix some bugs in SharedBufferStack::resizeMathias Agopian2010-05-171-4/+5
| | | | | | added buffers should now be labeled properly. Change-Id: I28aa753fbe89ab89134e7753575319478934c7fa
* Merge "SharedBufferStack now can grow up to 16 buffers." into krakenMathias Agopian2010-05-123-3/+55
|\
| * SharedBufferStack now can grow up to 16 buffers.Mathias Agopian2010-05-123-3/+55
| | | | | | | | | | | | there is a new resize() api, which currently only allows growing. Change-Id: Ia37b81b73be466d2491ffed7f3a23cd8e113c6fe
* | Merge "ZipUtilsRO rewrite based on Dalvik Zip rewrite" into krakenKenny Root2010-05-122-10/+27
|\ \ | |/ |/|
| * ZipUtilsRO rewrite based on Dalvik Zip rewriteKenny Root2010-05-122-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add incStrong and decStrong methods to ↵Jamie Gennis2010-05-112-0/+27
|\ \ | |/ |/| | | android_native_{window,buffer}_t." into kraken
| * Add incStrong and decStrong methods to android_native_{window,buffer}_t.Jamie Gennis2010-05-102-0/+27
| | | | | | | | | | | | | | | | | | This change adds the methods necessary to use sp<> to handle refcounting android_native_window_t and android_native_buffer_t. The new methods forward the refcounting operations to the corresponding android_native_base_t functions. Change-Id: I7de8e262728e439bc1efdf69374a2a9f6f432ced
* | am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and ↵Dan Egnor2010-05-061-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | libbinder." into froyo Merge commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f' into kraken * commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f': Make static versions of libutils and libbinder.
| * \ am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyoDan Egnor2010-05-061-1/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '8a8658a5de261c2da72d431940877bd054bc9837' into froyo-plus-aosp * commit '8a8658a5de261c2da72d431940877bd054bc9837': Make static versions of libutils and libbinder.
| | * | Make static versions of libutils and libbinder.Dan Egnor2010-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am f7896449: merge from open-source masterThe Android Open Source Project2010-05-051-1/+5
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'f78964490d8098387d51444c87bf520ad3f674e2' into kraken * commit 'f78964490d8098387d51444c87bf520ad3f674e2': Add new keycodes for the convenience of Japanese IMEs Call register_localized_collators() with the current locale. Fixed deserialization problem in DatePicker. Fix for bug 2467152 files with spaces fail to open. Set alpha value for newly created dim surface. telephony: Fix CID when CID is unknown
| * | | merge from open-source masterThe Android Open Source Project2010-05-051-1/+5
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: Ia9e1f4e049f5870386ea29ddb6e3ef028ea918da
| | * | | Add new keycodes for the convenience of Japanese IMEsmogimo2010-05-051-1/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibd308cef11261147856258595f6ca0137e03e05c
* | | | | Merge "Add support for enqueuing buffers in arbitrary order" into krakenMathias Agopian2010-04-301-1/+3
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Add support for enqueuing buffers in arbitrary orderMathias Agopian2010-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added a very simple SharedBufferStack unit test. Change-Id: I253dbbe98a53c966b78d22d4d6dd59f8aefc8c40
* | | | | Merge "cleanup. waitForCondition() now uses polymorphsim instead of ↵Mathias Agopian2010-04-292-72/+43
|\ \ \ \ \ | |/ / / / | | | | | | | | | | templtes" into kraken
| * | | | cleanup. waitForCondition() now uses polymorphsim instead of templtesMathias Agopian2010-04-282-72/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | incorrectly." into kraken
| * | | | fix a race condition in undoDequeue(), where 'tail' could be computed ↵Mathias Agopian2010-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+28
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | better fix for [2420565] Surface.lockCanvas() updates the dirty region too oftenMathias Agopian2010-04-211-1/+1
| | | | | | | | | | | | | | | | Change-Id: I83438b40effd21538f1c74396dc665254b9d5ab6
* | | | am f021d12f: merge from open-source masterThe Android Open Source Project2010-04-211-7/+10
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'f021d12f6f7116e9275cd3553a349ce5cb8aab14' into kraken * commit 'f021d12f6f7116e9275cd3553a349ce5cb8aab14': Allow META* macros outside of the framework Fix printing order of phone objects creation
| * | | merge from open-source masterThe Android Open Source Project2010-04-211-7/+10
| |\ \ \ | | |/ / | | | | | | | | Change-Id: I08f1feae65b1dfc3f740d78654c267f2e3ae5e85
| | * | Allow META* macros outside of the frameworkMichael Richardson2010-04-201-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The META* macros are useful outside of the framework for other systems implementing Binder interfaces, but they depend upon the android namespace. This includes the appropriate namespace operations, which should be sane even in that android namespace. Change-Id: If600156c65191f51f487d0ee301d9f9f532b263d
* | | | added setCrop() to android_native_window_tMathias Agopian2010-04-204-14/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | hooked up the new method up to Surface.cpp the actual crop is not implemented in SF yet Change-Id: Ic6e313c98fd880f127a051a0ccc71808bd689751
* | | | add support for up to 16 buffers per surfaceMathias Agopian2010-04-201-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | also increase the dirtyregion size from 1 to 6 rectangles. Overall we now need 27KiB process instead of 4KiB Change-Id: Iebda5565015158f49d9ca8dbcf55e6ad04855be3
* | | | am 26f61635: am 0a4ab1b9: Merge "fix [2599939] "cannot play video" after ↵Mathias Agopian2010-04-193-5/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | am 0a4ab1b9: Merge "fix [2599939] "cannot play video" after open/close a ↵Mathias Agopian2010-04-193-5/+2
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | video player a dozen of times" into froyo Merge commit '0a4ab1b9b4c7b891c1ecb67eed99e9c9b30c93aa' into froyo-plus-aosp * commit '0a4ab1b9b4c7b891c1ecb67eed99e9c9b30c93aa': 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-193-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | a 1x1 buffer instead of Nx1 (or 1xN) Change-Id: I27eeb15e83e13002dd9405f4e52b54f7dffc0fe7
* | | | don't hardcode "mSurface" throughout our source codeMathias Agopian2010-04-121-0/+2
|/ / / | | | | | | | | | | | | | | | | | | this is used in a few places to get access to the android.view.Surface native surface. use a macro instead. Also rename the field to mNativeSurface. Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
* | | merge from open-source masterThe Android Open Source Project2010-04-081-1/+5
|\ \ \ | |/ / |/| / | |/ Change-Id: I975030d9572463bc69245bcffa25c47d7acb2b51
| * Add keycodes PageUp and PageDownChih-Wei Huang2010-04-021-1/+5
| | | | | | | | | | | | This is useful for applications like web browser. Change-Id: Ie9262d5b75de87ecd0971407a7c3ce9aa6e4998e
* | fix [2545826] calling into gralloc with external lock heldMathias Agopian2010-03-251-1/+0
| | | | | | | | Change-Id: I2d0e017382404c684c768a0dd0423d574213f10a
* | libutils Condition are now PRIVATE by defaultMathias Agopian2010-03-191-1/+18
| | | | | | | | | | | | | | | | | | | | | | Condition must be initialized with SHARED for the old behavior, where they can be used accross processes. Updated the two places android that require SHARED conditions. PRIVATE conditions (and mutexes) use more efficient syscalls. Change-Id: I9a281a4b88206e92ac559c66554e886b9c62db3a