summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/BufferAllocator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix [2167050] glTexImage2D code path buggy in SurfaceFlingerMathias Agopian2009-10-061-129/+0
| | | | | | | | | | | | | | 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-2/+0
| | | | | | | | | | | 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.
* Allways dump the list of allocated buffers when an allocation fails.Mathias Agopian2009-09-271-0/+4
| | | | Hopefully this will help us understand cases of failures such as [2148405]
* fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properlyMathias Agopian2009-09-071-1/+10
| | | | | | | | | | | | | | | 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
* update surfaceflinger, libui and libagl to the new gralloc apiMathias Agopian2009-05-041-54/+2
| | | | | | | | | | | | | | - Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually. - factor all the lock/unlock code in SurfaceBuffer. - fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers(). - improved the situation with the dirty-region and fixed a problem that caused GL apps to not update. - make use of LightRefBase() where needed, instead of duplicating its implementation - add LightRefBase::getStrongCount() - renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp - disabled copybits test, since it clashes with the new gralloc api - Camera/Video will be fixed later when we rework the overlay apis
* Squashed commit of the following:Mathias Agopian2009-04-241-2/+1
| | | | | | | | | | | | | | commit e5c24638f98162c3b75b4c67a16b510d38e31341 Author: Mathias Agopian <mathias@google.com> Date: Fri Apr 17 14:09:03 2009 -0700 oops forgot this file. commit 282642632d0cb12882eecf42e0fdfb2343275de1 Author: Mathias Agopian <mathias@google.com> Date: Fri Apr 17 14:07:32 2009 -0700 use a helper macro for creating Singleton<>'s static attributes instances.
* fix a rookie mistake causing Singleton<> to be a "multiton". Also improve ↵Mathias Agopian2009-04-151-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | the BufferMapper's debugging, but turn it off. Squashed commit of the following: commit 04e9cae7f806bd65f2cfe35c011b47a36773bbe5 Author: Mathias Agopian <mathias@google.com> Date: Wed Apr 15 18:30:30 2009 -0700 fix and improve BufferMapper's tracking of mapped buffers. commit 1a8deaed15811092b2349cc3c40cafb5f722046c Author: Mathias Agopian <mathias@google.com> Date: Wed Apr 15 00:52:02 2009 -0700 fix some bugs with the Singleton<> class. untested. commit ed01cc06ad70cf640ce1258f01189cb1a96fd3a8 Author: Mathias Agopian <mathias@google.com> Date: Tue Apr 14 19:29:25 2009 -0700 some work to debug the Singleton<> template.
* more debugging tools around BufferMapperMathias Agopian2009-04-101-8/+8
|
* Integrate from //sandbox/mathias/donut/...@145728Mathias Agopian2009-04-101-0/+162
SurfaceFlinger rework for new EGL driver model support.