summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
Commit message (Collapse)AuthorAgeFilesLines
* remove a dependency of surfaceflinger on libskiaMathias Agopian2010-02-225-180/+351
| | | | | libskia was only used for a small part of SkTransform. We now implement Transform is surfaceflinger directly.
* Initialize layer positionMathias Agopian2010-02-191-0/+1
|
* get rid off the YUV formats at the libui layerMathias Agopian2010-02-163-21/+35
|
* minor cleanup.Mathias Agopian2010-02-122-18/+10
|
* split libsurfaceflinger_client and libcamera_client out of libuiMathias Agopian2010-02-119-23/+26
|
* Add support for physically rotated displaysMathias Agopian2010-02-082-37/+69
| | | | | | | | | | | | | 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.
* Add support for direct EGLImageKHR use with pushbuffer APIMathias Agopian2010-02-042-16/+31
| | | | | | | 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 support for 180/270 degrees rotation.Chih-Chung Chang2010-01-221-5/+14
|
* Add an orientation parameter for overlay, so we can do camera preview in ↵Chih-Chung Chang2010-01-216-12/+31
| | | | portrait mode.
* fix [2324665] texture leak in surfaceflinger when using cameraMathias Agopian2010-01-211-1/+16
|
* fix a texture leak introduced recently.Mathias Agopian2010-01-211-4/+11
| | | | | create the texture name once and for all for a given BufferSource and make sure to recreate it when we're forced to delete the texture.
* fix [2363362] [Sapphire] Corrupted raw picture displayed during snapshotMathias Agopian2010-01-201-0/+10
| | | | | handled all cases where the scale factor of a video is out of bounds of supported scale factors in copybit.
* part of fix for [2363362] [Sapphire] Corrupted raw picture displayed during ↵Mathias Agopian2010-01-202-11/+18
| | | | | | | | | 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-202-6/+8
| | | | don't try to use copybit for incompatible buffers
* fix [2269582] [TOP-10][Passion_1506][APT:Camera]Sometimes camera preview ↵Mathias Agopian2009-12-111-0/+1
| | | | | | | | | | | | | screen is truncated after launching and back to home screen by home key repeatedly When a surface is removed from the screen while it holds a "freeze lock", the release of that lock happens in the destructor as a "safety net". However, it doesn't trigger an update at that point. Make sure that "freeze locks" are released from the transaction at the point a surface is removed from the screen (if it's not on screen, it shouldn't prevent the screen to redraw, and therefore cannot hold a freeze lock). The refresh corresponding to that transaction will pick it up as soon as possible.
* fix [2319255] crash in openGL : from the media recorder stress test.Mathias Agopian2009-12-101-1/+8
| | | | | never call eglCreateImageKHR() with a NULL native buffer, which can happen in OOM conditions.
* fix [2315900] Monochrome camera preview screen after launching cameraMathias Agopian2009-12-092-50/+69
| | | | | | | | | | 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.
* improve video performance to minimize the tearing effect seen in 720p moviesMathias Agopian2009-12-081-9/+15
| | | | | | | | always rescale videos to their target size using copybit during yuv->rgb conversion. this improves performance of the GPU pass and doesn't require linear filtering to be enabled. Also always use 16-bits buffers. the average processing time for 720p dropped from ~50ms to ~30ms
* Revert "When using MDP, we needed to use a texture for diming."Dima Zavin2009-12-071-3/+0
| | | | This reverts commit bf0c320afbf6bf2441916755ecb443b64afbe73f.
* surfaceflinger: remove un-cached buffer hack for SGXErik Gilling2009-12-031-2/+1
| | | | Signed-off-by: Erik Gilling <konkers@android.com>
* fix [2291418] Camera preview cannot work in EmulatorMathias Agopian2009-12-021-13/+15
| | | | | | The image buffer used by glTexImage2d() would be uninitialized when no copybit engine can be found. We now always initialize images, since the abscence of copybit is not necessarily fatal.
* fix [2297155] SurfaceFlinger's freeze-timeout doesn't workMathias Agopian2009-12-012-13/+22
| | | | | | | | | 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.
* fixed [2260070] display stopped updatingMathias Agopian2009-11-301-0/+5
| | | | | always check that the visible region isn't empty after all visible regions are recomputed clear he freeze-lock if it is.
* When using MDP, we needed to use a texture for diming.Mathias Agopian2009-11-231-0/+3
|
* backout a workaround that is not needed anymoreMathias Agopian2009-11-191-1/+0
| | | | | we had to add a call to glFinish() before glReadPixels() because of a bug in the GL ES driver of a certain device. This is not needed anymore.
* fix [2269022] The raw picture displayed post shutter seems to have ↵Mathias Agopian2009-11-191-1/+6
| | | | | | | low-resolution Make sure to always enable linear filtering in LayerBuffer. This change doesn't affect devices using overlays.
* fix [2262591] Junk on screen in ERD46Mathias Agopian2009-11-162-3/+1
| | | | | | | | since we're using the GPU for composition, don't use a texture for dimming, instead simply use an alpha-blended quad. also workaround what looks like a GL driver bug by calling glFinish() before glReadPixels().
* addresses several bugs: 2206097, 2166583, 2261119, 2216759Mathias Agopian2009-11-131-1/+3
| | | | | | | | | | | | | 2206097: Broken suggestions while composing message 2166583: Color artifacts with MDP dithering 2261119: Passion transition animations are rough 2216759: Screen flicker when dropdown list in background window shows or hides This is part of enabling GPU composition instead of using the MDP. This change is dependent on another change in the vendor project. Specifically this change disables the use of EGLImageKHR for s/w buffers for cache coherency reasons. memcpy is used instead.
* fix [2143798] Need to figure out how to do video on Passion w/ GPUMathias Agopian2009-11-112-9/+69
| | | | | | | | | | 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.
* Merge change Id8b28e4f into eclairAndroid (Google) Code Review2009-10-301-3/+4
|\ | | | | | | | | * changes: fix [2225964] Android runtime restarted in surfaceflinger/BlurFilter.cpp
| * fix [2225964] Android runtime restarted in surfaceflinger/BlurFilter.cppMathias Agopian2009-10-291-3/+4
| | | | | | | | | | crash was due to an unintialized variable, which caused the wrong bluring format to be used and caused a memory overrrun.
* | Merge change I56779290 into eclairAndroid (Google) Code Review2009-10-302-21/+41
|\ \ | | | | | | | | | | | | * changes: fix[2222341] Soft reset while going back from camcorder settings
| * | fix[2222341] Soft reset while going back from camcorder settingsMathias Agopian2009-10-302-21/+41
| | | | | | | | | | | | | | | | | | 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
* | | Merge change If007a2fa into eclairAndroid (Google) Code Review2009-10-301-3/+1
|\ \ \ | |/ / | | | | | | | | | * changes: return proper error code from eglCreateImageKHR
| * | return proper error code from eglCreateImageKHRMathias Agopian2009-10-291-3/+1
| |/
* | DO NOT MERGE: Another gcc 4.0.3 workaround.Andy McFadden2009-10-301-0/+2
|/ | | | | | | Temporarily make a function public that doesn't need to be. When host gcc-4.0.3 is gone from the build servers we can undo this. (Cherry-picked from eclair-mr2.)
* fix [2143798] Need to figure out how to do videoMathias Agopian2009-10-278-187/+94
| | | | | | | | | 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 [2211532] improves sholes graphics performanceMathias Agopian2009-10-233-64/+146
| | | | | | | Instead of using glTex{Sub}Image2D() to refresh the textures, we're using an EGLImageKHR object backed up by a gralloc buffer. The data is updated using memcpy(). This is faster than glTex{Sub}Image2D() because the texture is not swizzled. It also uses less memory because EGLImageKHW is not limited to power-of-two dimensions.
* fix [2164183] sometimes device just wants to stay asleepMathias Agopian2009-10-071-3/+3
| | | | | | | | | | | When switching rapidily orientation back and forth, surfaces end-up acquiring the freeze-lock when the first orientation change happens, but never release it because by the time the 2nd orientation change comes in, the surface size is back to its original size and doesn't appear to have resized. we now always release the freeze-lock when we receive a buffer of the expected size.
* fix [2170319] gmail bulk operation checkbox latency on passionMathias Agopian2009-10-071-2/+4
| | | | | | | | | | | | | | | This also fixes [2152536] ANR in browser When SF is enqueuing buffers faster than SF dequeues them. The update flag in SF is not counted and under some situations SF will only dequeue the first buffer. The state at this point is not technically corrupted, it's valid, but just delayed by one buffer. In the case of the Browser ANR, because the last enqueued buffer was delayed the resizing of the current buffer couldn't happen. The system would always fall back onto its feet if anything -else- in tried to draw, because the "late" buffer would be picked up then.
* Revert "temporarily disable the use of glTexImage2D for sw buffers on sholes."Mathias Agopian2009-10-061-4/+4
| | | | | | This reverts commit c131c5671965b69b0dee3e4afa3b3dd5e3c0c405. Approved by Hiroshi
* Merge change I4961c959 into eclairAndroid (Google) Code Review2009-10-063-5/+5
|\ | | | | | | | | * changes: fix [2152536] ANR in browser
| * fix [2152536] ANR in browserMathias Agopian2009-10-063-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A window is created and the browser is about to render into it the very first time, at that point it does an IPC to SF to request a new buffer. Meanwhile, the window manager removes that window from the list and the shared memory block it uses is marked as invalid. However, at that point, another window is created and is given the same index (that just go freed), but a different identity and resets the "invalid" bit in the shared block. When we go back to the buffer allocation code, we're stuck because the surface we're allocating for is gone and we don't detect it's invalid because the invalid bit has been reset. It is not sufficient to check for the invalid bit, I should also check that identities match.
* | temporarily disable the use of glTexImage2D for sw buffers on sholes.Mathias Agopian2009-10-061-4/+4
|/ | | | | | we're going to first cut a build without this change. Approved by Dr. Hiroshi.
* fix [2168528] enable glTexImage2D code path in SF for software-only buffersMathias Agopian2009-10-064-5/+23
|
* fix [2167050] glTexImage2D code path buggy in SurfaceFlingerMathias Agopian2009-10-0614-560/+134
| | | | | | | | | | | | | | 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-028-33/+16
| | | | | | | | | | | 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
|
* fix [2152247] Windows sometimes drawn scaled up.Mathias Agopian2009-09-301-4/+34
|