replicant-frameworks_native/opengl/libs
Jesse Hall 258385978c Hibernate the EGL implementation when idle
If the EGL implementation supports the EGL_IMG_hibernate_process
extension, use it to hibernate (and hopefully release memory or other
resources) when the process isn't actively using EGL or OpenGL ES. The
idleness heuristic used in this change is:

(a) Wake up when entering any EGL API call, and remain awake for the
    duration of the call.
(b) Do not hibernate when any window surface exists; this means the
    application is very likely in the foreground.
(c) Do not hibernate while any context is made current to a thread.
    The app may be using a client API without the EGL layer knowing,
    so it is not safe to hibernate.
(d) Only check these conditions and attempt to hibernate after a
    window surface is destroyed or a thread's context is detached. By
    not attempting to hibernate at the end of every EGL call, we avoid
    some transient wakeups/hibernate cycles when the app is mostly idle,
    or is starting to become active but hasn't created its window
    surface yet.

On a Galaxy Nexus, hibernating frees 1567 VM pages from the process.
Both hibernating and waking can take anywhere from 30ms to over 100ms
-- measurements have been very inconsistent.

Change-Id: Ib555f5d9d069aefccca06e8173a89625b5f32d7e
2012-04-09 21:36:17 -07:00
..
EGL Hibernate the EGL implementation when idle 2012-04-09 21:36:17 -07:00
ETC1 Fix convert8To4, convert8To5 2011-12-09 14:06:07 -08:00
GLES2 Don't wrap EGLImageKHR and EGLSyncKHR anymore 2012-02-14 17:14:36 -08:00
GLES_CM Don't wrap EGLImageKHR and EGLSyncKHR anymore 2012-02-14 17:14:36 -08:00
GLES_trace gltrace: Only accept connections from the shell. 2012-03-15 16:41:35 -07:00
tools Don't wrap EGLImageKHR and EGLSyncKHR anymore 2012-02-14 17:14:36 -08:00
Android.mk glestrace: Framework for GLES tracing library 2011-12-02 15:30:17 -08:00
debug.in Initial commit of GLESv2 debugger server 2011-03-03 18:28:43 -08:00
egl_impl.h Don't wrap EGLImageKHR and EGLSyncKHR anymore 2012-02-14 17:14:36 -08:00
entries.in update GLES headers and add support for corresponding new extensions. 2012-01-28 20:41:35 -08:00
enums.in update GLES headers and add support for corresponding new extensions. 2012-01-28 20:41:35 -08:00
glestrace.h gltrace: transport buffering and context management 2012-01-04 11:38:37 -08:00
hooks.h update GLES headers and add support for corresponding new extensions. 2012-01-28 20:41:35 -08:00
trace.in update GLES headers and add support for corresponding new extensions. 2012-01-28 20:41:35 -08:00