summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/LayerBuffer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix [2143798] Need to figure out how to do video on Passion w/ GPUMathias Agopian2009-11-111-8/+66
| | | | | | | | | | 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[2228133] pixelflinger ignores the "vertical stride" leading to artifacts ↵Mathias Agopian2009-11-021-0/+2
| | | | | | | | when playing back video we lost the concept of vertical stride when moving video playback to EGLImage. Here we bring it back in a somewhat hacky-way that will work only for the softgl/mdp backend.
* fix[2222341] Soft reset while going back from camcorder settingsMathias Agopian2009-10-301-21/+36
| | | | | | 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
* return proper error code from eglCreateImageKHRMathias Agopian2009-10-291-3/+1
|
* fix [2143798] Need to figure out how to do videoMathias Agopian2009-10-271-121/+22
| | | | | | | | | 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-6/+5
| | | | | | | | | | | | | | 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.
* Overlay could not set position or rotation immediately after created, it ↵Benny Wong2009-09-161-0/+1
| | | | | | should be triggered by signalEvent(). Originally from: https://partner.source.android.com/g/#change,1074
* revert to black video background, since we don't need the color-key anylongerMathias Agopian2009-09-151-1/+2
|
* fix [2037525] Fail to start camera after adb sync new CameraMathias Agopian2009-09-091-14/+14
| | | | | | | | | 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-8/+7
|
* fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properlyMathias Agopian2009-09-071-10/+11
| | | | | | | | | | | | | | | 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 colorkey to gl clear operationRebecca Schultz Zavin2009-09-021-1/+5
| | | | Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
* second take, hopefully this time it doesn't break one of the builds: ↵Mathias Agopian2009-08-111-1/+0
| | | | "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
* second take, hopefully this time it doesn't break one of the builds: ↵Mathias Agopian2009-08-111-1/+5
| | | | "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
* Revert "SurfaceFlinger will now allocate buffers based on the usage ↵Fred Quintana2009-08-111-5/+1
| | | | | | specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything." This reverts commit 8b76a0ac6fbf07254629ed1ea86af014d5abe050.
* SurfaceFlinger will now allocate buffers based on the usage specified by the ↵Mathias Agopian2009-08-111-1/+5
| | | | | | | clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything. This change makes SurfaceHolder.setType(GPU) obsolete (it's now ignored). Added an API to android_native_window_t to allow extending the functionality without ever breaking binary compatibility. This is used to implement the new set_usage() API. This API needs to be called by software renderers because the default is to use usage flags suitable for h/w.
* Add a flag to set whether the overlay has been initialized. Commit needs to ↵Rebecca Schultz Zavin2009-07-221-2/+4
| | | | | | | | | | | 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/+6
|
* add support for out-of-range copybit scaling. camera capture is in color againMathias Agopian2009-06-251-52/+55
|
* use copybit for eglSwapBuffers() copy-back operationsMathias Agopian2009-06-251-1/+4
|
* make use of new eglGetRenderBufferANDROID extension to clean-up a bit a few ↵Mathias Agopian2009-06-251-37/+42
| | | | hacks added recently
* copybit now uses a native_handle_t* instead of a fd/offsetMathias Agopian2009-06-241-42/+44
|
* hack copybit back in for video playback on msm7k. we have h/w accelerated ↵Mathias Agopian2009-06-241-3/+121
| | | | video again
* fix a bug causing push-buffer surfaces' identity to be garbage, which ↵Mathias Agopian2009-06-231-0/+1
| | | | resulted in some attributes (size/pos) to fail to be set
* checkpoint. bring back video/cameraMathias Agopian2009-06-231-26/+24
|
* fix a memory corruption where a SF Client could be used after it's been ↵Mathias Agopian2009-06-191-1/+1
| | | | destroyed
* update surfaceflinger, libui and libagl to the new gralloc apiMathias Agopian2009-05-041-19/+19
| | | | | | | | | | | | | | - 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
* get rid of an old hack to work around a bug around glDeleteTextures() in the ↵Mathias Agopian2009-04-241-1/+1
| | | | adreno drivers
* more Surface lifetime managementMathias Agopian2009-04-241-5/+16
| | | | | 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-180/+34
| | | | SurfaceFlinger rework for new EGL driver model support.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+655
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-655/+0
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-22/+31
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-52/+113
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-151-11/+27
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-091-230/+387
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-3/+49
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+366