-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've been investigating how the Android EGL implementation handles power management events (EGL terminology, nothing to do with real power management) and unfortunately it seems to be all wrong.
Particularly, the spec says: > 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 occurred. 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. What actually seems to be happening is that when a GPU detach comes along, is that in EGL/gpu.cpp GPURevokeRequester::gpuLost() the EGL implementation table is patched to point at a specific implementation that returns EGL_CONTEXT_LOST for everything --- and the only way of getting it back to normal is call eglTerminate() and the eglInitialize(). Which of course badly violates the spec. This is causing big problems for us because we have a big third-party app that is expecting all this to work according to spec. I've been trying to implement a shim that massages the Android EGL into something that works, but it's very problematic. eglSwapBuffers has a tendency to hang. Can anyone shed any light on this, and hopefully suggest a workaround? Changing our app's lifecycle model is not possible, alas. - -- ┌─── 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 iEYEARECAAYFAksK5QwACgkQf9E0noFvlzgw1QCeMz0RfZ8MaUwJu72vd3Su3w69 mCMAoJdHv5SpKhZhRiP7luMMZHKbbCEy =hGiX -----END PGP SIGNATURE----- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting