Merge commit '311ed0191d6423e41b1cf5137a38e53504494818' into eclair-plus-aosp
* commit '311ed0191d6423e41b1cf5137a38e53504494818':
Create samples showing how to call OpenGL from JNI libraries.
Until now we had a race condition where the GL rendering thread could
continue rendering a frame after we have returned from the
SurfaceHolder.Callback.surfaceDestroyed notification.
Merge commit 'cc7f40a88d64cbb4e664e231668ae4e2862036c6' into eclair-plus-aosp
* commit 'cc7f40a88d64cbb4e664e231668ae4e2862036c6':
log an error when loading an existing GL driver fails
Merge commit 'cd0aceb710fc3b62a238992ceef628e359ee1e7d' into eclair-plus-aosp
* commit 'cd0aceb710fc3b62a238992ceef628e359ee1e7d':
Draw a green triangle using OpenGL 2.0 APIs.
Merge commit 'ebebf9c36c0112d99cb2e11953febdff8ba5ff23' into eclair-plus-aosp
* commit 'ebebf9c36c0112d99cb2e11953febdff8ba5ff23':
AGL's glCompressedTexImage2D now checks the imageSize parameter.
Merge commit 'e00d660aba91a7a682f83b2e0216296b0f3cca64' into eclair-plus-aosp
* commit 'e00d660aba91a7a682f83b2e0216296b0f3cca64':
Simple app to create a gl2 context and dump the strings.
this change fixes the lifetime mgt of EGLSurface, EGLContext and EGLImageKHR in the EGL wrapper.
EGLDisplay is still somewhat bogus and libagl's EGL is still incorrect.
The idea of the change is that EGL objects are put in a list when created and removed when destroyed.
Before each use, we first verify if the object is in the list and if so a reference is taken and kept
for the scope of the whole EGL API being called, if not, an error is returned.
Upon object destruction, the object is simply marked as "terminated" (this is not protected by a lock
because it doesn't really matter). This flag is only used to deny access to the object by other APIs
while it's still valid (for instance current or being used by another function in another thread).
A reference is also removed and the object can then actually be destroyed when going out of scope.
refactored the code so that:
- EGL APIs that can be called before or after eglInitialize() will work by loading the drivers first
- make eglGetDisplay() a lot more efficient
- make sure that EGL drivers are loaded in a thread-safe way
- don't unload the drivers upon calling eglTerminate(), they're now never unloaded, since there is no safe way to do it (some thread could be running)
- updated our EGL version to 1.4
- return better error codes if errors happen during initialization
* changes:
Revert "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."
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.