summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/Layer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix [2143798] Need to figure out how to do videoMathias Agopian2009-10-271-59/+6
| | | | | | | | | 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-231-63/+142
| | | | | | | 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.
* fix [2152536] ANR in browserMathias Agopian2009-10-061-2/+2
| | | | | | | | | | | | | | | | 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.
* fix [2168528] enable glTexImage2D code path in SF for software-only buffersMathias Agopian2009-10-061-3/+14
|
* fix [2167050] glTexImage2D code path buggy in SurfaceFlingerMathias Agopian2009-10-061-22/+55
| | | | | | | | | | | | | | 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-8/+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.
* fix [2152247] Windows sometimes drawn scaled up.Mathias Agopian2009-09-301-4/+34
|
* invalidate the surface when the physical changesMathias Agopian2009-09-301-7/+4
|
* introduce the notion of the requested size in the Layer stateMathias Agopian2009-09-291-8/+8
|
* minor SurfaceFlinger code cleanup and remove unnecessary testsMathias Agopian2009-09-241-2/+0
|
* turn dithering off if it's not neededMathias Agopian2009-09-231-1/+14
|
* fix [2133214] STOPSHIP: revert I4a06bb4f: workaround for [2113743] Sholes: ↵Mathias Agopian2009-09-231-2/+2
| | | | | | | | 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-2/+2
|
* fix [2129080] Soft reboot after clicking around and then rubbing the screenMathias Agopian2009-09-171-3/+9
|
* fix [2119400] sholes: artifacting when switching orientationMathias Agopian2009-09-161-13/+13
|
* add support for RGBX_8888 surfaces in SurfaceFlingerMathias Agopian2009-09-141-0/+3
|
* fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymoreMathias Agopian2009-09-101-10/+44
| | | | 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-374/+119
| | | | | | | | | | | | | | | 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
* fix a bug that could cause a window to be hidden in some cases.Mathias Agopian2009-08-131-1/+6
| | | | | | | this would happen is the window is made visible but the client didn't render yet into it. This happens often with SurfaceView. Instead of filling the window with solid black, SF would simply ignore it which could lead to more disturbing artifacts. in theory the window manager should not display a window before it has been drawn into, but it does happen occasionnaly.
* Surface::GPU and Surface::HARDWARE are now deprecated; they will be set ↵Mathias Agopian2009-08-131-3/+0
| | | | | | automatically if needed. this also ripples into the window manager API by making some constant there deprecated as well.
* second take, hopefully this time it doesn't break one of the builds: ↵Mathias Agopian2009-08-111-4/+4
| | | | "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-4/+4
| | | | | | 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-4/+4
| | | | | | | 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.
* remove unused and confusing commentMathias Agopian2009-08-071-10/+0
|
* free gralloc buffers as soon as possible (when a surface is not visible any ↵Mathias Agopian2009-07-021-1/+2
| | | | longer), client who have the buffers still mapped won't crash, btu may see garbage data
* checkpoint. bring back video/cameraMathias Agopian2009-06-231-7/+5
|
* fix a memory corruption where a SF Client could be used after it's been ↵Mathias Agopian2009-06-191-7/+14
| | | | destroyed
* merge master to master_glMathias Agopian2009-05-221-1/+0
|\
* | update surfaceflinger, libui and libagl to the new gralloc apiMathias Agopian2009-05-041-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Merge commit 'goog/master' into merge_masterMathias Agopian2009-04-301-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: libs/surfaceflinger/Layer.cpp libs/surfaceflinger/SurfaceFlinger.cpp opengl/libagl/egl.cpp opengl/libs/EGL/egl.cpp opengl/libs/GLES_CM/gl.cpp opengl/libs/GLES_CM/gl_api.in opengl/libs/gl_entries.in opengl/libs/tools/glapigen
| * fix 1803886 android15 Translucent GLSurfaceView demo does not display properlyMathias Agopian2009-04-271-1/+1
| |
* | get rid of an old hack to work around a bug around glDeleteTextures() in the ↵Mathias Agopian2009-04-241-1/+1
| | | | | | | | adreno drivers
* | Surfaces are now destroyed properly in SurfaceFlinger.Mathias Agopian2009-04-241-0/+10
| | | | | | | | | | | | | | | | | | | | First, the window manager tells us when a surface is no longer needed. At this point, several things happen: - the surface is removed from the active/visible list - it is added to a purgatory list, where it waits for all clients to release their reference - it destroys all data/state that can be spared Later, when all clients are done, the remains of the Surface are disposed off: it is removed from the purgatory and destroyed. In particular its gralloc buffers are destroyed at that point (when we're sure nobody is using them anymore).
* | more Surface lifetime managementMathias Agopian2009-04-241-3/+14
| | | | | | | | | | 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-127/+206
|/ | | | SurfaceFlinger rework for new EGL driver model support.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+568
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-568/+0
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-1/+3
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-3/+1
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-091-2/+2
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-15/+18
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+565