-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Given wrote:
[...]
> I have an application that uses EGL. It creates an EGLSurface in the
> normal manner, draws on it, etc. Then the user presses the HOME button.
> 
> The EGL spec says this:
> 
>>     Following a power management event, calls to eglSwapBuffers, eglCopy-
>> Buffers, or eglMakeCurrent will indicate failure by returning EGL FALSE. The
>> error EGL CONTEXT LOST will be returned if a power management event has oc-
>> curred.
>>     On detection of this error, the application must destroy all contexts 
>> (by calling
>> eglDestroyContext for each context). To continue rendering the application 
>> must
>> recreate any contexts it requires, and subsequently restore any client API 
>> state and
>> objects it wishes to use.
>>     Any EGLSurfaces that the application has created need not be destroyed
>> following a power management event, but their contents will be invalid.
> 
> I would expect that my app detaching from the screen to be considered
> this sort of power management event.
> 
> However, Android doesn't do this. Instead what happens is that it calls
> my SurfaceHolder.Callback.surfaceDestroyed() method and then nukes the
> surface without telling me. The Android docs say this:

Does anyone know anything about this?

This is becoming a very serious issue for us --- Android's support for
EGL_CONTEXT_LOST appears to be just plain broken in a lot of places.
Specifically, once it's in a dead context state, all operations fail ---
including calls to eglCreateContext(), which we need to call to get it
working again! Not to mention that eglGetError() always returns
EGL_CONTEXT_LOST and never resets to EGL_SUCCESS, which violates the spec.

One we get a dead context, how can we get EGL back up and running again?

- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "Sufficiently advanced incompetence is indistinguishable from
│ malice." -- Vernon Schryver
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksKgggACgkQf9E0noFvlzh4owCffic+r4RZUGwWo/2wjh3Tn6JR
bVwAoMSdQkx7fuBm5aEqTElp+FkP26vX
=0ZgR
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to