summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/LayerBuffer.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "fix [2793164] Spam 2x/second with TOT master in SurfaceFlinger"Andreas Huber2010-06-251-1/+0
| | | | This reverts commit 081bc5c47d8a980e6eafa70ddafcd89981586391.
* fix [2793164] Spam 2x/second with TOT master in SurfaceFlingerMathias Agopian2010-06-241-0/+1
| | | | | | | 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
* clean-up client management.Mathias Agopian2010-06-041-2/+2
| | | | | | | simplified things a lot, the biggest change is that the concept of "ClientID" is now gone, instead we simply use references. Change-Id: Icbc57f80865884aa5f35ad0d0a0db26f19f9f7ce
* clean-up dead-codeMathias Agopian2010-05-261-3/+0
|
* Refactor some code in surfaceflinger in preparation of upcoming changesMathias Agopian2010-05-121-2/+3
| | | | | | | | | | | | 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
* more surfaceflinger cleanupsMathias Agopian2010-04-211-5/+1
| | | | | | | get rid of the "fake rtti" code, and use polymorphism instead. also simplify how we log SF's state (using polymorphism) Change-Id: I2bae7c98de4dd207a3e2b00083fa3fde7c467922
* fixes for [2474091] Saw Poor behaviour playing a video.Mathias Agopian2010-03-081-1/+2
| | | | | | | | | | | | | | - fix a bug when hacking video buffers into gralloc buffers where the buffer size was incorrect this was causing the "direct-form-texture" mode to fail - also when the above fails, make sure to revert to the "mdp copy mode" before going to "slow mode" - finally disable completely the "direct-from-texture" mode for now. It cannot work because the allocated buffers can't respect the GPU constraints (alignment and such). We'll have to find a solution for that.
* minor cleanup.Mathias Agopian2010-02-121-1/+0
|
* Add support for direct EGLImageKHR use with pushbuffer APIMathias Agopian2010-02-041-0/+1
| | | | | | | We now always first try to use the EGLImageKHR directly before making a copy with copybit. The copy may be needed when EGLImage doesn't support the requested format, which is currently the case with YUV.
* Add an orientation parameter for overlay, so we can do camera preview in ↵Chih-Chung Chang2010-01-211-3/+5
| | | | portrait mode.
* part of fix for [2363362] [Sapphire] Corrupted raw picture displayed during ↵Mathias Agopian2010-01-201-0/+1
| | | | | | | | | snapshot make sure to fallback properly to software when copybit operation fails. with this change, the preview image will at least be displayed in b&w (since GL doesn't support the yuv format). This would also fix 2363506, but that one is now handled more cleanly.
* fix [2363506] [Sapphire] Video playback brokenMathias Agopian2010-01-201-0/+4
| | | | don't try to use copybit for incompatible buffers
* fix [2315900] Monochrome camera preview screen after launching cameraMathias Agopian2009-12-091-1/+2
| | | | | | | | | | this was introduced by a recent change. when we try to figure out the size of the yuv->rgb temporary buffer, the output resolution has not been computed yet and an invalid buffer size is used. most of the time the allocation fails and the system reverts to "standard" GL will uses onle the Y plane. the allocation of the temporary buffer is moved to onDraw(), the first time it is called, by that time, the window is positioned properly.
* fix [2143798] Need to figure out how to do video on Passion w/ GPUMathias Agopian2009-11-111-1/+3
| | | | | | | | | | This builds on the EGLImage solution. We simply use copybit to convert from the YUV frame into an EGLImage created for that purpose and proceed with the regular EGLImage code. We need to do this because "regular" GL doesn't support YUV textures. We could improve upon this by detecting exacly what the GL supports and bypass this extra step if not required, but we'll do this later if needed.
* fix[2222341] Soft reset while going back from camcorder settingsMathias Agopian2009-10-301-0/+5
| | | | | | add a way to convert a mapped "pushbuffer" buffer to a gralloc handle which then can be safely used by surfaceflinger, without including gralloc_priv.h
* fix [2143798] Need to figure out how to do videoMathias Agopian2009-10-271-1/+0
| | | | | | | | | Use EGLImageKHR instead of copybit directly. We now have the basis to use streaming YUV textures (well, in fact we already are). When/if we use the GPU instead of the MDP we'll need to make sure it supports the appropriate YUV format. Also make sure we compile if EGL_ANDROID_image_native_buffer is not supported
* fix [2167050] glTexImage2D code path buggy in SurfaceFlingerMathias Agopian2009-10-061-4/+1
| | | | | | | | | | | | | | 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.
* fix [2037525] Fail to start camera after adb sync new CameraMathias Agopian2009-09-091-19/+15
| | | | | | | | | we ended-up locking a Mutex that had been destroyed. This happened because we gave an sp<Source> to the outside world, and were called after LayerBuffer had been destroyed. Instead we now give a wp<LayerBuffer> to the outside and have it do the destruction.
* rename Mutexes to make the code easier to followMathias Agopian2009-09-081-11/+14
|
* fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properlyMathias Agopian2009-09-071-4/+6
| | | | | | | | | | | | | | | 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
* Add a flag to set whether the overlay has been initialized. Commit needs to ↵Rebecca Schultz Zavin2009-07-221-0/+1
| | | | | | | | | | | be called at least once on each overlay, and it appears that sometimes this doesn't happen because the visibility never changes. With this change the overlay parameter and position will be committed when either the visibility of the window changes, or on the first call to visibility resolved, if it hasn't already been done. Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
* Fix hardware overlay so all changes are commited when done.Rebecca Schultz Zavin2009-07-211-0/+1
|
* get rid of references to MemoryDealer in SurfaceFlingerMathias Agopian2009-07-021-1/+0
|
* hack copybit back in for video playback on msm7k. we have h/w accelerated ↵Mathias Agopian2009-06-241-0/+3
| | | | video again
* checkpoint. bring back video/cameraMathias Agopian2009-06-231-7/+7
|
* fix a memory corruption where a SF Client could be used after it's been ↵Mathias Agopian2009-06-191-1/+1
| | | | destroyed
* merge master to master_glMathias Agopian2009-05-221-1/+1
|\
| * move libbinder's header files under includes/binderMathias Agopian2009-05-201-1/+1
| |
* | more Surface lifetime managementMathias Agopian2009-04-241-6/+6
| | | | | | | | | | Surfaces are now destroyed once all references from the clients are gone, but they go through a partial destruction as soon as the window manager requests it. This last part is still buggy. see comments in SurfaceFlinger::destroySurface()
* | Integrate from //sandbox/mathias/donut/...@145728Mathias Agopian2009-04-101-15/+7
|/ | | | SurfaceFlinger rework for new EGL driver model support.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+216
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-216/+0
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-3/+3
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-19/+15
|
* auto import from //branches/cupcake/...@127101The Android Open Source Project2009-01-201-1/+1
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-151-3/+6
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-091-33/+101
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-1/+5
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+145