summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/SurfaceFlinger.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "fix [2793164] Spam 2x/second with TOT master in SurfaceFlinger"Andreas Huber2010-06-251-4/+1
| | | | This reverts commit 081bc5c47d8a980e6eafa70ddafcd89981586391.
* fix [2793164] Spam 2x/second with TOT master in SurfaceFlingerMathias Agopian2010-06-241-1/+4
| | | | | | | Make sure to not use GL_TEXTURE_EXTERNAL when it's not supported by the GL. The error was harmless, but annoying. Change-Id: I571a9a9b05d35da51420950a6a6e95629067efd0
* Added support for the GL_TEXTURE_EXTERNAL targetMathias Agopian2010-06-151-22/+19
| | | | | | This will allow us to support YUV surfaces. Change-Id: I2d4da75f1006a5285bdc552695d4caeecccf2183
* allow re-targetting of surfacesMathias Agopian2010-06-081-5/+14
| | | | | | | | | 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-081-1/+2
|
* split surface management from surface's buffers managementMathias Agopian2010-06-041-48/+148
| | | | Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
* clean-up client management.Mathias Agopian2010-06-041-207/+114
| | | | | | | simplified things a lot, the biggest change is that the concept of "ClientID" is now gone, instead we simply use references. Change-Id: Icbc57f80865884aa5f35ad0d0a0db26f19f9f7ce
* more clean-up in preparation of bigger changesMathias Agopian2010-05-281-3/+3
| | | | | | | the most important change here is the renaming of ISurfaceFlingerClient to ISurfaceComposerClient Change-Id: I94e18b0417f50e06f21377446639c61f65f959b3
* fix the threading issue for setBuffercount()Mathias Agopian2010-05-201-13/+21
| | | | | | | | 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"
* more surfaceflinger cleanupsMathias Agopian2010-04-211-85/+21
| | | | | | | get rid of the "fake rtti" code, and use polymorphism instead. also simplify how we log SF's state (using polymorphism) Change-Id: I2bae7c98de4dd207a3e2b00083fa3fde7c467922
* clean-up surfaceflinger a bitMathias Agopian2010-04-201-3/+2
| | | | | | get rid of the glDrawTexi path and use floating points instead of fixed point maths Change-Id: I3aa9ce2dc082f702160e605a16ba5fe987cdf087
* Make pixels prettier.Mathias Agopian2010-04-051-1/+1
| | | | Change-Id: If3b0774b70cbe943894c15ffa1da111ad887010f
* fix [2511580] Window poop on screen - drop down list left some residual when ↵Mathias Agopian2010-03-161-17/+55
| | | | | | it resized Change-Id: Ib9a3622e7a568ba26717a93b5bfa4a191651f4d0
* improve SF logging/debugging a little bitMathias Agopian2010-03-081-4/+0
| | | | Change-Id: I6a57f89c25defc293fd748cc1fbd710031c02ec2
* fix [2425395] portrait UI briefly shows in landscapeMathias Agopian2010-03-011-1/+2
| | | | | the "freeze" timeout was not initialized properly which caused it to kick-in immediately instead of after 5s
* Added a name to Surface created by SurfaceFlingerMathias Agopian2010-03-011-4/+9
| | | | | Updated the window manager to use this new facility. Surfaces name are now printed by "dumpsys".
* to help debugging [2461567] Home screen redraw messed upMathias Agopian2010-02-261-0/+4
| | | | log SF's idea of the front buffer in dumpsys.
* remove a dependency of surfaceflinger on libskiaMathias Agopian2010-02-221-29/+16
| | | | | libskia was only used for a small part of SkTransform. We now implement Transform is surfaceflinger directly.
* Add support for physically rotated displaysMathias Agopian2010-02-081-34/+62
| | | | | | | | | | | | | This feature is currently controled by a system property. "ro.sf.hwrotation" can be set to either 90 or 270. It'll cause SF to rotate the screen by 90 and 270 degres respectively. That is, if the driver reports 800x480 for instance, and ro.sf.hwrotation is set to 90, applications will "see" a 480x800 display and will run in portrait. This is implemented by introducing an extra "display" transformation in the GraphicPlane.
* fix [2297155] SurfaceFlinger's freeze-timeout doesn't workMathias Agopian2009-12-011-12/+17
| | | | | | | | | There was bug in the logic that calculated the relative timeout, the start time was reset each time an event was received, which caused the timeout to never occur if an application was constantly redrawing. Now we always check for a timeout when we come back from the waitEvent() and process the "anti-freeze" if needed, regardless of whether an event was received.
* fix [2167050] glTexImage2D code path buggy in SurfaceFlingerMathias Agopian2009-10-061-5/+6
| | | | | | | | | | | | | | When EGLImage extension is not available, SurfaceFlinger will fallback to using glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an extra copy. However this code path has never been exercised and had some bugs which this patch fix. Mainly the scale factor wasn't computed right when falling back on glDrawElements. We also fallback to this mode of operation if a buffer doesn't have the adequate usage bits for EGLImage usage. This changes only code that is currently not executed. Some refactoring was needed to keep the change clean. This doesn't change anything functionaly.
* Attempt to fix [2152536] ANR in browserMathias Agopian2009-10-021-1/+2
| | | | | | | | | | | The ANR is caused by SurfaceFlinger waiting for buffers of a removed surface to become availlable. When it is removed from the current list, a Surface is marked as NO_INIT, which causes SF to return immediately in the above case. For some reason, the surface here wasn't marked as NO_INIT. This change makes the code more robust by always (irregadless or errors) setting the NO_INIT status in all code paths where a surface is removed from the list. Additionaly added more information in the logs, should this happen again.
* attempt to work around [2155085, 2150246] stuck in closeTransaction()Mathias Agopian2009-09-301-1/+8
|
* remove unused codeMathias Agopian2009-09-291-6/+0
|
* don't emit GL commands when sf is in freeze modeMathias Agopian2009-09-271-9/+1
| | | | | | | | We were emitting GL commands, calling composition complete and releasing clients without ever calling eglSwapBuffers(), which is completely wrong on non-direct renders. This could cause transient drawing artifacts when unfreezing the screen (upon orientaion change for instance) and could also block the clients for ever as they are waiting for their previous buffer to be rendered.
* minor SurfaceFlinger code cleanup and remove unnecessary testsMathias Agopian2009-09-241-3/+3
|
* turn dithering off if it's not neededMathias Agopian2009-09-231-2/+3
|
* fix [2133214] STOPSHIP: revert I4a06bb4f: workaround for [2113743] Sholes: ↵Mathias Agopian2009-09-231-17/+4
| | | | | | | | frozen then runtime restart going to list view Revert "workaround for [2113743] Sholes: frozen then runtime restart going to list view" This reverts commit 4a06bb4f3355b0ef2b76aa883704da9d154c44ae.
* workaround for [2113743] Sholes: frozen then runtime restart going to list viewMathias Agopian2009-09-201-4/+17
|
* Android side of the fix for [2121211] Sholes has stutter during animationsMathias Agopian2009-09-171-0/+3
| | | | a new method, compostionComplete() is added to the framebuffer hal, it is used by surfaceflinger to signal the driver that the composition is complete, BEFORE it releases its client. This gives a chance to the driver to
* add basic time stats for surfaces lock timeMathias Agopian2009-09-171-2/+3
|
* fix [2117464] SF can crash when calling dumpsysMathias Agopian2009-09-141-2/+13
|
* fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymoreMathias Agopian2009-09-101-6/+8
| | | | this also fixes part of [2111536] Device is soft rebooted after ending the call through voice dialer
* fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properlyMathias Agopian2009-09-071-64/+35
| | | | | | | | | | | | | | | Rewrote SurfaceFlinger's buffer management from the ground-up. The design now support an arbitrary number of buffers per surface, however the current implementation is limited to four. Currently only 2 buffers are used in practice. The main new feature is to be able to dequeue all buffers at once (very important when there are only two). A client can dequeue all buffers until there are none available, it can lock all buffers except the last one that is used for composition. The client will block then, until a new buffer is enqueued. The current implementation requires that buffers are locked in the same order they are dequeued and enqueued in the same order they are locked. Only one buffer can be locked at a time. eg. Allowed sequence: DQ, DQ, LOCK, Q, LOCK, Q eg. Forbidden sequence: DQ, DQ, LOCK, LOCK, Q, Q
* attempt to fix [2099362] Possible SurfaceFlinger crashMathias Agopian2009-09-041-2/+6
|
* dumpsys SurfaceFlinger will now always dump SF's state, even if SF is deadlockedMathias Agopian2009-08-261-1/+54
| | | | | | | | (in this case the state is dumped without the proper locks held which could result to a crash) in addition, the last transaction and swap times are printed to the dump as well as the time spent *currently* in these function. For instance, if SF is unresponsive because eglSwapBuffers() is stuck, this will show up here.
* fix a bug that caused the PixelFormat viewed by Surface to be wrong.Mathias Agopian2009-08-191-5/+13
| | | | | what happened is that the efective pixel format is calculated by SF but Surface nevew had access to it directly. in particular this caused query(FORMAT) to return the requested format instead of the effective format.
* resolved conflicts for merge of ac38dfc5 to masterMathias Agopian2009-07-281-6/+9
|\
| * fix [2017532] Partial Update leaves residual image.Mathias Agopian2009-07-281-7/+14
| |
* | am 4d2dbebf: fix for [1885684] E/SurfaceFlinger( 60): not enough memory for ↵Mathias Agopian2009-07-091-0/+7
|\ \ | |/ | | | | | | | | | | | | | | layer bitmap size=4294938624 Merge commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f' * commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f': fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
| * fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap ↵Mathias Agopian2009-07-091-0/+7
| | | | | | | | size=4294938624
| * fix [1947273] the DimLayer causes the whole screen to update during transactionsMathias Agopian2009-06-281-5/+6
| |
* | get rid of references to MemoryDealer in SurfaceFlingerMathias Agopian2009-07-021-28/+26
| |
* | free gralloc buffers as soon as possible (when a surface is not visible any ↵Mathias Agopian2009-07-021-30/+14
| | | | | | | | longer), client who have the buffers still mapped won't crash, btu may see garbage data
* | fix a bug that caused artifacts when SWAP_RECTANGLE was enabledMathias Agopian2009-06-291-3/+17
| |
* | fix [1947273] the DimLayer causes the whole screen to update during transactionsMathias Agopian2009-06-291-5/+6
| |
* | fix an update bug with SHOW_UPDATE debug feature. Fix a problem with the ↵Mathias Agopian2009-06-261-8/+17
| | | | | | | | debug binder codes too
* | fix a memory corruption where a SF Client could be used after it's been ↵Mathias Agopian2009-06-191-36/+39
| | | | | | | | destroyed
* | release the last reference to surfaces explicitely instead of letting it go ↵Mathias Agopian2009-06-191-3/+5
| | | | | | | | implicitely when the message is destroyed
* | new Permission class used to improve permission checks speed (by caching ↵Mathias Agopian2009-06-151-21/+14
| | | | | | | | results)