summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/LayerBase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix [2143798] Need to figure out how to do videoMathias Agopian2009-10-271-0/+57
| | | | | | | | | 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-1/+1
| | | | | | | 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 [2167050] glTexImage2D code path buggy in SurfaceFlingerMathias Agopian2009-10-061-55/+40
| | | | | | | | | | | | | | 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-1/+8
| | | | | | | | | | | 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.
* invalidate the surface when the physical changesMathias Agopian2009-09-301-0/+6
|
* introduce the notion of the requested size in the Layer stateMathias Agopian2009-09-291-11/+19
|
* remove unused codeMathias Agopian2009-09-291-8/+2
|
* remove dead codeMathias Agopian2009-09-291-6/+0
|
* minor SurfaceFlinger code cleanup and remove unnecessary testsMathias Agopian2009-09-241-65/+55
|
* turn dithering off if it's not neededMathias Agopian2009-09-231-8/+6
|
* fix [2142193] disable GL_LINEAR when not neededMathias Agopian2009-09-231-19/+23
|
* add support for RGBX_8888 surfaces in SurfaceFlingerMathias Agopian2009-09-141-2/+4
|
* fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymoreMathias Agopian2009-09-101-3/+5
| | | | 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-23/+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
* fix [2098939] Smooth gradients show banding on SholesMathias Agopian2009-09-041-1/+2
|
* Add colorkey to gl clear operationRebecca Schultz Zavin2009-09-021-2/+9
| | | | Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
* fix a bug that caused the PixelFormat viewed by Surface to be wrong.Mathias Agopian2009-08-191-8/+0
| | | | | what happened is that the efective pixel format is calculated by SF but Surface nevew had access to it directly. in particular this caused query(FORMAT) to return the requested format instead of the effective format.
* second take, hopefully this time it doesn't break one of the builds: ↵Mathias Agopian2009-08-111-1/+1
| | | | "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-1/+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/+1
| | | | | | | 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.
* NPOT EGLimage without GL_ARB_texture_non_power_of_two would be improperly ↵Mathias Agopian2009-07-301-1/+2
| | | | | | | | | | | | scalled The current gralloc allocates buffer memory for render targets that will typically have NPOT dimensions. Assuming that the vendor driver supports converting the resulting NPOT android_native_buffer_t to a NPOT EGLImage, SurfaceFlinger calls glEGLImageTargetTexture2DOES(), and uses glGetError() to test whether the GL can support creating an EGL target texture with the specified NPOT EGLImage. If it is supported, the DIRECT_TEXTURE flag remains set, otherwise it is cleared. Tangentially, if the driver advertises the GL_ARB_texture_non_power_of_two extension, the NPOT_EXTENSION flag is set, otherwise it is cleared. If the driver supported creating an EGL target texture from a NPOT source EGLImage, it implicitly creates a NPOT texture. This does not need any glScalef() texture coordinate correction in LayerBase::drawWithOpenGL(). However, the same driver may not advertise the GL_ARB_texture_non_power_of_two extension nor generally support NPOT textures that were not derived from EGLImages. So SurfaceFlinger may flag only DIRECT_TEXTURE, not NPOT_EXTENSION. Therefore, the test in LayerBase::drawWithOpenGL() should only perform the glScalef() if neither NPOT_EXTENSION or DIRECT_TEXTURE are flagged. Otherwise scaling is applied to NPOT EGL target textures when none is required.
* fix a bug causing push-buffer surfaces' identity to be garbage, which ↵Mathias Agopian2009-06-231-4/+4
| | | | resulted in some attributes (size/pos) to fail to be set
* checkpoint. bring back video/cameraMathias Agopian2009-06-231-9/+14
|
* fix a memory corruption where a SF Client could be used after it's been ↵Mathias Agopian2009-06-191-7/+11
| | | | destroyed
* new Permission class used to improve permission checks speed (by caching ↵Mathias Agopian2009-06-151-15/+8
| | | | results)
* merge master to master_glMathias Agopian2009-05-221-2/+2
|\
* | Region now has its own implementation instead of relying on SkRegion, which ↵Mathias Agopian2009-05-171-15/+21
| | | | | | | | allows us to break libui's dependency on libcorecg.
* | update surfaceflinger, libui and libagl to the new gralloc apiMathias Agopian2009-05-041-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-2/+0
| | | | | | | | adreno drivers
* | more Surface lifetime managementMathias Agopian2009-04-241-10/+17
| | | | | | | | | | 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-141/+174
|/ | | | SurfaceFlinger rework for new EGL driver model support.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+740
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-740/+0
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-7/+10
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-1/+20
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-091-3/+14
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-15/+22
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+700