replicant-frameworks_native/opengl/libs/EGL
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_cache.cpp remove multiplexing of multiple EGL implementation 2012-02-13 18:11:42 -08:00
egl_cache.h
egl_display.cpp Hibernate the EGL implementation when idle 2012-04-09 21:36:17 -07:00
egl_display.h Hibernate the EGL implementation when idle 2012-04-09 21:36:17 -07:00
egl_entries.in Hibernate the EGL implementation when idle 2012-04-09 21:36:17 -07:00
egl_object.cpp Hibernate the EGL implementation when idle 2012-04-09 21:36:17 -07:00
egl_object.h Hibernate the EGL implementation when idle 2012-04-09 21:36:17 -07:00
egl_tls.cpp
egl_tls.h
egl.cpp Increment/decrement a counter around EGL calls 2012-04-09 21:35:17 -07:00
eglApi.cpp Hibernate the EGL implementation when idle 2012-04-09 21:36:17 -07:00
egldefs.h EGLConfig is now not remaped to an internal EGLConfig 2012-02-13 20:23:15 -08:00
getProcAddress.cpp
Loader.cpp EGLConfig is now not remaped to an internal EGLConfig 2012-02-13 20:23:15 -08:00
Loader.h remove multiplexing of multiple EGL implementation 2012-02-13 18:11:42 -08:00
trace.cpp